COBOL Manual for TNS and TNS/R Programs

Input and Output Concepts
HP COBOL Manual for TNS and TNS/R Programs522555-006
26-6
Associating COBOL File Names With System File
Names
In the Guardian environment, you can override the file assignment that you made at
compilation time before executing the program (see Overriding File Assignments Made
at Compilation Time). The new system-file-name in the overriding ASSIGN
command can also be a special name—any special name except #DYNAMIC.
#IN
In the Guardian environment, #IN represents the file specified as the IN parameter in
the startup message of the current process. If you started the current process from a
TACL prompt, #IN refers to the file specified by the IN option of the RUN command (or
its default). (See Specifying Default Input and Output Devices.)
In the program PROG1, these SELECT and ASSIGN clauses associate the COBOL
file name MAJRACCT with the special system file name #IN:
SELECT MAJRACCT ASSIGN TO #IN
Equivalently, these ASSIGN command associates the COBOL file name MAJRACCT
with the special system file name #IN:
ASSIGN PROG1.MAJRACCT, #IN
If you run the program PROG1 with this command, the special name #IN represents
the system file INFILE, so INFILE is associated with the COBOL file name
MAJRACCT.
PROG1 /IN INFILE/
In the OSS environment, #IN is the default input device (FD 0). You cannot use it in
SELECT clauses or the SPECIAL-NAMES paragraph as you can in the Guardian
environment.
#OUT In the Guardian file system, the file named in the OUT
parameter of startup message of current process
In the OSS file system, the default output device (FD 1)—
do not use it in SELECT clauses or the SPECIAL-NAMES
paragraph as you can in the Guardian environment
#TERM
Home terminal of current process
#TEMP
Temporary disk file on default volume
#DYNAMIC
File name specified with the run-time library routine
COBOLASSIGN (in the non-CRE environment) or
COBOL_ASSIGN_ (in the CRE) during the execution of
the current process
Table 26-1. Special Names for System Files (page 2 of 2)
Special System File Name Place holder for ...