Download Contents - Datatek Applications

Transcript
System Administration
The above ABORT response is a controlled exit from the sequence command.
Error Handling
So far we have been assuming that the node does not produce any error
messages. In the above example if the group name in $GROUP was newgrp and
newgrp was already defined, the node would respond with
GROUP [up to 8 chars]: newgrp
INPUT ERROR: Group Already Exisits: newgrp
GROUP [up to 8 chars]:
The node is now waiting for a second entry of the group name. In the above
example, the GROUP ABORT will be used. Therefore, the sequence command
would have exited the same way for both normal and abnormal conditions. It
would be preferred in this case to exit with an error indication. (The error message
from the node would only be seen if the -v option is set.) The way to generate an
error return from the sequence command is via the ABORT instruction as follows:
GROUP
ERROR
TYPE
DIRECT
DEVICE
PASS
ROUND
GROUP
$GROUP
ABORT
local
2way
device1
+
+
ABORT
Looping
The above example shows how a duplicate prompt (GROUP) can be used to
terminate the sequence command (via the ABORT). There are cases, however,
when it is desirable to respond to duplicate prompts with the same or different
data. The above patterns file can be modified to enter two groups into GROUP1
and GROUP2. In both cases, however, the remaining data will be the same for
both groups since the iteration is specified as 2 for the prompts. The patterns file
is as follows:
GROUP
GROUP
ERROR
TYPE
DIRECT
DEVICE
PASS
ROUND
GROUP
$GROUP1
$GROUP2
ABORT
local
2way
device1
+
+
ABORT
2
2
2
2
2
StarKeeper II NMS Core System Guide R10.0, Issue 1
3-69