Safeguard Reference Manual (G06.24+, H06.03+ )

SAFECOM Session-Control Commands
Safeguard Reference Manual520618-013
4-21
OBEY Command
OUT listfile
redirects SAFECOM output to listfile for all the commands in command-file.
For listfile, specify any file name.
If listfile does not exist, SAFECOM creates an EDIT-format file and then
writes all output text to that file. If listfile exists, SAFECOM opens the file and
appends the output text.
command-file
is the name of a file containing SAFECOM commands (usually an EDIT-format
file). The name can be any file name.
Considerations
Nesting command files
Command files can be nested, with one OBEY command file within another.
Command files can be nested to a depth of four. For example, from the SAFECOM
prompt, you could enter the command OBEY FILE1. FILE1 could contain the
command OBEY FILE2, FILE2 could contain the command OBEY FILE3, and
FILE3 could contain the command OBEY FILE4.
Command-file error handling
When SAFECOM encounters a syntax error or invalid object type while executing
a command file, it aborts processing of the command file.
Stopping the execution of a command file
Press the BREAK key to stop the execution of a command file. SAFECOM stops
processing commands and closes the command file.
Using FC after executing a command file
When you enter the FC command after executing a command file, the FC
command displays the OBEY command rather than the last command executed in
the command file.
Example
This example shows the use of a command file named $DATA.SECURE.INFOADMN.
This command file prints an INFO report about all the users in the ADMIN group:
=OBEY $data.secure.infoadmn
=OUT $s.#lp -- redirect output to $S.#LP
=INFO USERS admin.* , DETAIL -- report on all admin users
=OUT -- redirect output to terminal
=