COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 260 COBOL File Names
MAJRACCT
MAJOR-ACCOUNT
MajorAccount-3
Associating COBOL File Names With System File Names
The file-control entry for a file associates its COBOL file name with one of:
• System File Name
• Special Name
• Nonnumeric and National Literals
If you want to associate the COBOL file name with a system file name at run time, see #DYNAMIC.
System File Name
The most straightforward way to associate a COBOL file name with a system file name is to use
the file-control entry to assign a COBOL file name (the file-name in the SELECT clause) to a
system file name (the system-file-name in the ASSIGN clause).
These SELECT and ASSIGN clauses associate the COBOL file name MAJRACCT with the system
file name \AKRON.$SLB.MAJ.ACC:
SELECT MAJRACCT ASSIGN TO "\AKRON.$SLB.MAJ.ACC"
When the HP COBOL program opens MAJRACCT, the file it actually opens is
\AKRON.$SLB.MAJ.ACC.
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
(page 821)). You cannot do this in the OSS environment.
For the syntax of a system file name in the Guardian environment, see the Guardian Programmer’s
Guide. For the syntax of a system file name in the OSS environment, see Files in the OSS
Environment (page 713).
Special Name
A special name is a place holder for a specific file whose system file name is determined at run
time.
Table 112 Special Names for System Files
Place holder for ...Special System File Name
In the Guardian file system, the file named in the IN parameter of startup message
of current process
#IN
In the OSS file system, the default input device (FD 0)—do not use it in SELECT
clauses or the SPECIAL-NAMES paragraph as you can in the Guardian environment
In the Guardian file system, the file named in the OUT parameter of startup message
of current process
#OUT
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
Home terminal of current process#TERM
Temporary disk file on default volume#TEMP
File name specified with the run-time library routine COBOL_ASSIGN_ during the
execution of the current process
#DYNAMIC
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
Files 833










