Stacked I/O Redirection [ Command Interpreter Access and Variables Programmer's Guide ] MPE/iX 5.0 Documentation
Command Interpreter Access and Variables Programmer's Guide
Stacked I/O Redirection
I/O redirection may be done even if I/O has already been redirected.
For example, say you have created a command file named SHOW, which
contains the following:
parm showdest="$STDLIST"
showme
showout >!showdest
showvar
showjob >>!showdest ;job=!hpuser.!hpaccount
Now let's say you set a file equation for printer LP602 and invoke SHOW
as follows:
show outfile >*lp602
After variable substitution and I/O redirection, this results in the
following sequence of commands and output destinations:
showme output to lp602 (spoolfile)
showout output to a temporary file named outfile
showvar output to lp602 (a new spoolfile)
showjob output appended to the temporary file outfile
Output from the showme and showvar commands goes to the device defined by
the file equation for lp602.
Output from the showout command is redirected to the file outfile and
output from showjob is appended to outfile. This occurs because the
entire show command file has its output redirected to LP602. But inside
the command file, the showout and showjob commands redirect output
(again) to the temporary file name outfile.
MPE/iX 5.0 Documentation