COBOL Manual for TNS/E Programs (H06.03+)

Input and Output Concepts
HP COBOL Manual for TNS/E Programs520347-003
26-5
Associating COBOL File Names With System File
Names
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
DEFINE Name
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). 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.