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

Disk Input and Output
HP COBOL Manual for TNS/E Programs520347-003
28-40
Physical File Names
An HP COBOL program can call an Enscribe or other operating system routine with
the ENTER statement. Some Enscribe and operating system routines are not safe to
use from an HP COBOL program; others are.
Topics:
Physical File Names
Obtaining File Numbers and Other File Attributes
Determining Whether Two COBOL File Names Specify the Same Physical File
Purging a File From an HP COBOL Program
Purging the Contents of a File From an HP COBOL Program
Renaming a File From an HP COBOL Program
Creating a File Having Alternate Keys From an HP COBOL Program
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).
Caution. Generally, it is not safe to mix HP COBOL input-output operations and direct calls to
Enscribe input-output routines for the same open file. Although you can use HP COBOL
statements to open, close, and checkpoint a file and also call Enscribe routines to perform
operations that HP COBOL does not provide, calling Enscribe routines disables useful
HP COBOL tools such as declaratives and file-status data items, causing corruption or loss of
data, abnormal termination, and other failures. Although such calls might work in one RVU of
the software, they are not guaranteed to work in subsequent RVUs.