COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Modification
With the ENABLE utility, you can build a file-maintenance application that allows you to modify a
disk file. ENABLE uses a Data Definition Language (DDL) file description to create a Pathway
application that you can use to read and change the data in the disk file. For details, see the
ENABLE User’s Guide.
Maximum Number of Files
The maximum number of files on a volume is determined during system configuration. The maximum
number of files that a single process can have open concurrently depends on the amount of space
available for file control blocks and buffers in the upper 64 KB of the process’s user data space.
Types of HP Disk Files
NonStop systems provide two types of disk files:
• Unstructured (Sequential) Files
• Structured Files
Unstructured (Sequential) Files
An unstructured file consists of a stream of bytes, and Enscribe allows each byte to be addressed
directly. The organization of an unstructured file is the responsibility of the program that uses it.
An HP COBOL program can only use an unstructured file as a sequential file.
Two examples of unstructured files are object code files (file code 100) and EDIT files (file code
101).
An EDIT file can have variable-length records, but all other unstructured files must have fixed-length
records. No unstructured file can have alternate record keys.
A program written entirely in HP COBOL can open an EDIT file for both input and output (or
extension). The HP COBOL program cannot access the line numbers of the EDIT file, only the text
of the lines themselves.
A program written entirely in HP COBOL can open unstructured files that are not in EDIT format
for input or output, but cannot create an unstructured file.
To use an existing unstructured file, your HP COBOL program must declare it:
• With ORGANIZATION SEQUENTIAL
• With ACCESS MODE SEQUENTIAL
• With fixed-length records (if the file is not an EDIT file)
• Without alternate keys
When using an unstructured file, an HP COBOL program still operates on the basis of records, but
they are strictly logical records. If one HP COBOL program writes an unstructured file of 80-character
records, another program can read it with any record length. If the reading program expects
37-character records, the run-time routines deliver 37-byte pieces of the continuous byte stream.
You can rewrite a record with another record of the same length, but you cannot delete a record.
The HP COBOL run-time routines that access unstructured disk files manage those files directly. An
unstructured file has no records, as far as Enscribe is concerned; the declarations in your HP COBOL
program determine how the HP COBOL run-time routines manipulate the unstructured files.
Structured Files
Structured disk files are either entry-sequenced, relative, or key-sequenced.
Types of HP Disk Files 861










