Process Permanent Files (PPFs)
SYS$ERROR (UN*X equivalent: stderr)
When interactive, points to your terminal, unless you redirect it:$ DEFINE SYS$ERROR filespec$ DEFINE/USER SYS$ERROR filespec
In batch, points to the job log unless you redirect it.
Notes:
The SYS$ERROR stream, which is equivalent to the UN*X standard error (stderr) stream, usually points to your terminal.
When a DCL procedure is invoked using /OUTPUT, SYS$ERROR points to the file specified. Similarly, when a DCL procedure is SUBMITted to batch, SYS$ERROR points to the batch job's log file (if any).
SYS$ERROR can be redirected using DEFINE (or ASSIGN). If DEFINEd in /USER mode, it will be DEASSIGNed when a program is run and that program terminates. If DEFINEd in /SUPERVISOR mode (the default if no access mode is specified in the DEFINE (or ASSIGN) command) or an “inner” (more privileged) mode, it remains in effect until explicitly DEASSIGNed.