COBOL Manual for TNS and TNS/R Programs
Disk Input and Output
HP COBOL Manual for TNS and TNS/R Programs—522555-006
28-41
Physical File Names
Physical File Names
A physical file name is the file name by which the Enscribe disk file handling routines
recognize a file (as opposed to the COBOL file name, which is also called the internal
file name).
In the non-CRE environment, Enscribe disk file handling routines demand file names in
one of two rigid formats—one for local files and one for files on other nodes of the
Expand network. They correspond to these HP COBOL declarations:
01 Enscribe-LOCAL-FILE-NAME.
03 VOLUME-SPECIFIER.
05 FILLER PICTURE X VALUE IS "$".
05 VOLUME-NAME PICTURE X(7).
03 SUBVOLUME-NAME PICTURE X(8).
03 FILE-NAME PICTURE X(8).
01 Enscribe-NETWORK-FILE-NAME.
03 SYSTEM-SPECIFIER.
05 FILLER PICTURE X VALUE IS "\".
05 ONE-BYTE-SYSTEM-NUMBER PICTURE X.
03 VOLUME-SPECIFIER.
05 VOLUME-NAME PICTURE X(6).
03 SUBVOLUME-NAME PICTURE X(8).
03 FILE-NAME PICTURE X(8).
The data item ONE-BYTE-SYSTEM-NUMBER is a 1-byte integer whose value is in the
range 0 through 254. Each node in an Expand network has a unique system name and
a unique system number. The number and name of a node are established during
system generation.
Obtaining File Numbers and Other File Attributes
When a process opens a file, Enscribe assigns the file a number that is unique within
that process. File number zero is always set aside for $RECEIVE, regardless of
whether a process opens it or not. The first other file that a process opens is assigned
file number one. Enscribe always assigns the lowest available file number. After a
process closes a file, the associated file number becomes available.
Many Enscribe routines require file numbers instead of file names. Each of these
routines returns a file number:
•
HP COBOL routine COBOLFILEINFO or COBOL_FILE_INFO_
•
Enscribe routine FILE_GETINFO_
Each of the preceding routines can return other file attributes in addition to the file
number; use the routine best suited to your needs.