COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
When the read operation cannot be completed within 5 seconds, control passes to the USE
procedure for the OAK file, which can adjust the program’s behavior appropriately. The USE
procedure displays a diagnostic to the OUT file. The program could retry a certain number of
times, or (if it is a server) report back to its requester that the read operation could not be completed,
which is another way to handle a file that might be locked at the file or record level.
Using Enscribe and Operating System Routines
Enscribe routines are a subset of operating system routines that function collectively as the operating
environment’s database record manager. All processes use Enscribe routines to interact with records
in disk files in the database. HP COBOL run-time routines that perform input-output operations do
so by calling Enscribe routines, but they also handle HP COBOL-related processing that Enscribe
does not, such as declaratives and file status code data items.
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.
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.
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.
Using Enscribe and Operating System Routines 883










