Owner's manual

Switch Command Interface (SWCI)
ServerNet Nomadic Disk User’s Guide425485-001
6-13
OBEY Command
OBEY Command
The OBEY command instructs SWCI to execute commands contained in a command
file that you specify. A command file is an EDIT file (file code 101) that contains
commands (in this case, SWCI commands). When you use the OBEY command, SWCI
echoes each command to the terminal as it is executed, along with any output generated
by the command. After sequentially executing all commands in the file, SWCI prompts
for the next command.
[[$volume.]subvolume.]filename
specifies the command file to be executed.
Considerations
If the volume and subvolume are not specified, SWCI uses the default volume and
subvolume.
If the file does not exist or is not an EDIT file, SWCI returns an error message and
prompts for the next command.
If command syntax errors are detected, SWCI returns an error message and
terminates execution of any remaining commands in the file.
You cannot nest OBEY commands in an SWCI command file. If an OBEY
command is encountered in the command file, SWCI returns an error message and
terminates execution of any remaining commands in the file.
Example
This example shows an OBEY command that uses a command file to display the switch
module status, move the switches in slots 2 and 4 to the straight position, and then
display the new switch module status:
SWCI $NDSWA.#TERM> OBEY $SYSTEM.RECORDS.SWITCH
where $SYSTEM.RECORDS.SWITCH contains the following commands:
STATUS
LOCK SC 2
SWITCH SC 2, STRAIGHT
UNLOCK SC 2
LOCK SC 4
SWITCH SC 4, STRAIGHT
UNLOCK SC 4
STATUS
OBEY [[$volume.]subvolume.]filename