CI i/o redirection
> name - redirect output from $STDLIST to “name”
- “name” will be overwritten if it already exists
- file will be saved as “name”;rec=-256,,v,ascii;disc=10000;TEMP
- file name can be MPE or POSIX syntax
>> name - redirect, append output from $STDLIST to “name”
- same file attributes for “name” if it is created
< name - redirect input from $STDIN to “name”
- “name” must exist (TEMP files looked for before PERM files)
-
I/O redirection has no meaning if the command does not do I/O to $STDIN or $STDLIST
available on all commands, except:
- IF, ELSEIF, SETVAR, CALC, WHILE, COMMENT, SETJCW, TELL, TELLOP, WARN, REMOTE.
Notes:
- I/O redirection in the CI works similarly to the same feature in DOS and Unix systems. Of course, there are some exceptions: on MPE the file created by output redirection is a TEMP, variable record width file. The motivation for these choices is that we didn’t want to mistakenly overwrite a permanent file if the “>” or “>>” symbols on a command line were not really intended for redirection. We decided to make the default record with be variable so that the file created and also be read more easily by the CI, since trailing spaces (found in fixed ASCII files) would not need to be stripped. All of the I/O redirection defaults can be overridden via a file equation.
- There are11 CI command that do not accept I/O redirection. Five of these are commands that introduce an expression as one of their parameters. Since expressions can contain “<“, “>” it was decided to disable I/O redirection on these command. The remaining commands are excluded because we were conservative and careful when I/O redirection was introduced in MPE XL Release 2.1. We did not want to break existing scripts, UDCs, or JCL that might have “>” or “<“ in one of these commands, causing the CI would to remove the symbol and following name, and write to a file.