beautypg.com

Obey command, Considerations, Example – HP NonStop G-Series User Manual

Page 83

background image

Switch Command Interface (SWCI)

ServerNet Nomadic Disk (Release 2) User’s Guide 523968-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 locked 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
UNLOCK SC 2
SWITCH SC 2, STRAIGHT
LOCK SC 2
UNLOCK SC 4
SWITCH SC 4, STRAIGHT
LOCK SC 4
STATUS

OBEY [[$volume.]subvolume.]filename