Safeguard Reference Manual (G06.24+, H06.03+ )
SAFECOM Session-Control Commands
Safeguard Reference Manual—520618-013
4-20
OBEY Command
logfile
establishes a log file for SAFECOM. You can specify any file name. If logfile 
does not exist, SAFECOM creates an EDIT-format file and writes the session log 
records to that file. If logfile exists, SAFECOM opens the file and appends the 
log records.
Considerations
•
Changing log files in the middle of a session
You can change the log file in the middle of a session by entering a LOG command 
that specifies a different file as logfile. For example, suppose you are currently 
logging your session in a file called LOGFILE1, but you want to change to 
LOGFILE2:
=LOG logfile2
SAFECOM closes LOGFILE1, opens LOGFILE2, and writes all subsequent input 
commands and output text to LOGFILE2.
•
Determining your current log file
To display the name of your current log file:
=ENV LOG
 LOG $DATA.SALES.LOGFILE2
Example
This LOG command sends a record of your subsequent SAFECOM session to the file 
$GARB.RECORD.MAY5:
=LOG $garb.record.may5
OBEY Command
OBEY temporarily suspends input from your terminal and instead accepts input 
commands from a command file. SAFECOM displays each command as it is 
performed. After executing all the commands in the command file, SAFECOM prompts 
you for the next command.
You can use command files to perform any number of SAFECOM commands through 
a single OBEY command. A command file can contain any SAFECOM command 
except FC.
Command files are typically created through an editor such as TEDIT. Each text line in 
the file is treated as a separate SAFECOM command line. The same rules that apply 
to interactive SAFECOM commands apply to lines in a command file. 
O[BEY] [ / OUT listfile / ] command-file










