COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
If a file in the file system is defined as having alternate record keys to which the COBOL
program does not make any reference, you do not need to specify them in the File-Control
paragraph.
An alt-key is permitted only for structured disk files and not for unstructured disk files or
files that are not disk files. A file having a LINAGE clause in its file description cannot be a
disk file (although it can be spooled to a printer by way of a disk). It is, therefore, never legal
to define a file with an ALTERNATE RECORD KEY clause and have a LINAGE clause in the
file description entry for that file.
• Sequential Block Buffering
Sequential block buffering, enabled by the RESERVE clause when the file is open in INPUT or
I-O mode, is a feature of the Enscribe database record manager that enables faster reading
of a sequentially structured file by reading a block of records together into a memory buffer.
The file’s access must be sequential, but its organization can be sequential, relative, or indexed.
A program requests sequential block buffering (or does not request it) when it opens the file.
Each process that opens the file requests or does not request sequential block buffering. One
process can request it while another process does not. Nothing stored on the disk keeps a
record of whether the file is to be read with sequential block buffering.
The RESERVE clause acts as a switch. In the CRE, the number 2 means to use sequential
block buffering on input (and buffered cache on output) if the assigned file qualifies.
Enscribe determines the size of the sequential block buffer. Usually, the buffer size is the file’s
data block size, but when a process accesses a file by alternate keys, the buffer size is the
alternate key file’s data block size. You can obtain the data block size for the appropriate
file with the FUP command:
FUP INFO file-name,DETAIL
The size is usually 1,024 characters.
The size of the buffer space used for reading is 4* dbs, where dbs is the file’s data block
size. The BLOCK CONTAINS clause, if specified, is ignored. Because double buffering is
used, the size of the block read is half the size of the buffer. The maximum size of blocks read
is 32,768 characters.
If the process cannot perform sequential block buffering for any reason, it performs normal
input-output. The file status code is “07”.
NOTE: With the advent of the DP2 disk processing system, normal I/O could be faster than
sequential block buffering, depending on the number of records per block. For example, a
file containing eight 4K blocks and 1600 records requires one physical I/O operation and
1600 interprocess messages in normal mode, but eight physical I/O operations and only
eight interprocess messages in SBB mode; on the other hand, a file with eight 4K blocks and
only eight records requires one physical I/O and eight interprocess messages in normal mode,
but eight physical I/O operations and eight interprocess messages in SBB mode
• Buffered Cache
Buffered cache is a feature of the DP2 disk process that uses more efficient disk I-O to write
disk files.
The RESERVE clause acts as a switch. In the CRE, the number 2 means to use buffered cache
on output (and sequential block buffering on input) if the assigned file qualifies. The file must
be open in the OUTPUT, I-O, or EXTEND mode.
The size of the buffer space used for writing is 29K characters, regardless of the number in
the RESERVE clause.
This technique buffers records in cache rather than writing them immediately to disk, thereby
reducing the number of requests to the disk process. Audited files always use buffered cache;
Input-Output Section 123










