HP System Dictionary/XL SDMAIN Reference Manual (32256-90001)

2- 14
Commands containing syntax errors
Subsystem commands, such as Edit/V responses you enter through the use of the EDIT command
The REDO command and its editing subcommands (The resulting edited dictionary commands, howev-
er, are logged as they are executed.)
Certain commands you enter within a START/SAVE pair
The START/SAVE command pair is a System Dictionary pair of reporting commands. Only executable
commands within this pair are logged. Therefore, no COMMENT, HELP or SHOW commands that can
occur within this pair are logged. As with the REDO command, once you issue the SAVE command, the
START/SAVE pair is executed and all executable commands within that pair are logged to SDLOG.
If you enter a [[CONTROL]] Y before you enter the full command, the entire command is not logged.
Macro calls and INCLUDE commands arenotlogged. However, the expanded macro and the commands
in the include file are logged as they are executed.
Redirecting the Log File. To redirect SDLOG to another file, enter the following MPE command:
:FILE SDLOG =
log file name
When SDLOG is redirected to another file, the specified file saves all input entered for that session. If the
file does not exist, then SDMAIN builds it as a temporary fixed-length ASCII file with a record size of 80
bytes. If the file already exists, then SDMAIN asks for permission to overwrite it with the following
prompt:
filename.groupname.accountname
already exists. Is it okay to overwrite (N/Y)?
If you respond NO to the above prompt, logging is disabled and no commands are logged.
If SDLOG is not redirected (or if it is redirected to a temporary file), it is only a temporary file and must be
saved if you want SDLOG to become a permanent file. To do this, issue the MPE SAVE command and then
rename the resulting file:
:SAVE SDLOG
:RENAME SDLOG, LOGFILE
If you fail to rename the saved file to something other than SDLOG, and do not redirect SDLOG, SDMAIN
asks you for permission to overwrite it during the next run. If you answer NO, logging is disabled and no
commands are written to the log file. You can use the OPTIONS command to change the log during a run.
You can disable logging in several ways, The first is to redirect SDLOG to the file $NULL. Next, as
mentioned above, a response of NO to the overwrite prompt disables logging. Finally, the OPTIONS
command can turn logging ON and OFF during a run.
The ability to redirect the log file is a valuable feature. This capability, in conjunction with the ability to
redirect the input file, allows you to create and save a file of commands that you can reuse at a later date.
This becomes especially helpful if, for instance, a certain sequence of commands is executed on a regular
basis. If, for example, once a month, all data elements within a particular data set are updated, the
sequence of commands necessary to accomplish this update can be kept in a command file and simply re-
executed whenever needed.
Examples
There are several ways to combine SDLOG and SDIN. In both of the following cases, the input file SDIN is
redirected to take input from a command file. In the first example, the log file is redirected to another file
called cmdfile, which is then saved and used as input for the redirected input file:
:FILE SDLOG=cmdfile Redirects SDLOG to cmdfile.
:RESET SDIN Cancels any existing file equations for SDIN. Do this if SDIN is
already directed to a file.