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

2- 15
:RUN SDMAIN.PUB.SYS Runs SDMAIN and enters the commands. The commands that are now en-
tered, go to the file cmdfile.
:
:SAVE cmdfile Saves cmdfile as a permanent file.
:FILE SDIN=cmdfile SDIN now takes commands from this file.
:RESET SDLOG Cancels the previous file equation for SDLOG.
:RUN SDMAIN.PUB.SYS Commands are now taken from cmdfile.
Notice that the MPE RESET command is used here to cancel any existing file equations for SDIN and
SDLOG.
The following example saves and renames the SDLOG file. The redirected SDIN file then uses the
renamed file.
:RUN SDMAIN.PUB.SYS Commands are written to SDLOG.
:
:SAVE SDLOG Saves SDLOG file.
:RENAME SDLOG,cmdfile Renames SDLOG file to cmdfile.
:FILE SDIN=cmdfile SDIN takes commands from this file.
:RUN SDMAIN.PUB.SYS Commands are now taken from cmdfile.
Both of the above methods give you the same result.
The Macro File (SDMACRO)
SDMAIN allows you to define macros (see the discussion of macros later in this Chapter). The definitions
are placed in a file that the system loads when SDMAIN is run. The default is for there to be no macro file
(if no file named SDMACRO exists) and so no macros available when the system is run. The file must be
an unnumbered file with a record length of 80 bytes or less (if over 80 bytes, only the first 80 are read and
the remainder are ignored).
Redirecting the Macro File. To redirect SDMACRO to a file, use the following MPE file equation:
:FILE SDMACRO =
macro file name
Now, the next time SDMAIN is run, the macros that have been defined in macro file name are loaded for
use. If no file equate is provided and there is no file named SDMACRO, no macros are available for the
next run. You can use the OPTIONS command to change the macro file during a run.
The Output File (SDOUT)
SDMAIN's reporting information is written to the output file called SDOUT. The default for this file is
$STDLIST, which for sessions is your terminal. Note that only output from reporting commands is sent to
the file. All other output (that is, HELP, SHOW, and error messages) is still sent to $STDLIST.
Redirecting the Output File. To redirect SDOUT to a file, use the following MPE file equation:
:FILE SDOUT =
output file name
If the file does not exist, then SDMAIN builds it as a permanent ASCII file with a record size of 132 bytes.
If the file already exists, then SDMAIN asks for permission to overwrite it: