Exchange/SNA Manual

OBEY Command
Exchange/SNA Commands
104700 Tandem Computers Incorporated 3–33
OBEY Command The OBEY command executes a series of Exchange/SNA commands read from a file.
O[BEY]
command-file
command-file
is the file containing the Exchange/SNA commands that you want to execute. The
commands in the file are read and executed until the end of the file is reached, at
which point control returns to the Exchange/SNA command interpreter and you
can again enter commands interactively.
The file can be an unstructured disk file, an EDIT-format file, a device file, or
another process. The maximum record length is 130 characters.
If you omit the volume name, your current default volume is used. If you omit
both the volume and subvolume names, your current default volume and
subvolume are used.
Considerations The OBEY command executes a sequence of Exchange/SNA commands read from the
specified file (the command file). By placing a commonly used sequence of commands
in a file, you can execute the complete sequence of commands with a single OBEY
command.
You can use the OBEY command within a command file. The depth to which you can
nest OBEY commands is limited only by available memory.
Error Handling
If a command from the command file produces an error, an error message is displayed
and execution continues with the next command from the command file. If the
following commands are dependent on the command that failed, the following
commands also fail. For example, if a CONNECT command fails, all subsequent
SEND and RECEIVE commands also fail.
BREAK Key
If you press the BREAK key while a command file is executing, execution is suspended
and control returns to the command interpreter. When control returns to
Exchange/SNA, the command file continues executing from where it left off.
Example This example shows the OBEY command:
>o ex02
COMMENT - reconnect to $SNAX1 line server
SET NAME $SNAX1
CONNECT !
SNCI37 CONNECTION ESTABLISHED WITH SERVER '$SNAX1'(7,51) ON SYSTEM \SNAX
>