COBOL Manual for TNS and TNS/R Programs

Input and Output Concepts
HP COBOL Manual for TNS and TNS/R Programs522555-006
26-7
Associating COBOL File Names With System File
Names
#OUT
In the Guardian environment, #OUT represents the file specified as the OUT
parameter in the startup message of the current process. If you started the current
process from a TACL prompt, #OUT refers to the file specified by the OUT 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 REPORT with the special name #OUT:
SELECT REPORT ASSIGN TO #OUT
Equivalently, these ASSIGN command associates the COBOL file name REPORT with
the special name #OUT:
ASSIGN PROG1.REPORT, #OUT
If you run the program PROG1 with this command, the special name #OUT represents
the system file OUTFILE, so OUTFILE is associated with the COBOL file name
REPORT.
PROG1 /OUT OUTFILE/
In the OSS environment, #OUT is the default output device (FD 1). You cannot use it in
SELECT clauses or the SPECIAL-NAMES paragraph as you can in the Guardian
environment.
#TERM
The special name #TERM represents the home terminal of the current process. If you
started the current process from a TACL prompt, #TERM refers to the file specified in
the TERM option of the RUN command (or its default). (See Specifying the Home
Terminal.)
In the program PROG1, these SELECT and ASSIGN clauses associate the COBOL
file name HOME-TERMINAL with the special name #TERM:
SELECT HOME-TERMINAL ASSIGN TO #TERM
Equivalently, these ASSIGN command associates the COBOL file name HOME-
TERMINAL with the special name #TERM:
ASSIGN PROG1.HOME-TERMINAL, #TERM
If you run the program PROG1 with this command, the system file $TE1.#E02 is
associated with the special name #TERM and, therefore, with the COBOL file name
HOME-TERMINAL.
PROG1 /TERM $TE1.#E02/