COBOL Manual for TNS and TNS/R Programs

Environment Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
6-36
FILE-CONTROL Paragraph
You must not use buffered cache in applications that require each record to be
actually written to disk before execution of the next statement in the program.
HP COBOL Fast I-O (Local Buffering)
HP COBOL Fast I-O is an enhancement in input-output performance beyond that
of sequential block buffering or buffered cache. It is available if a program and the
sequential file on which it is to operate meet these criteria:
°
You are not creating an audited file (you can read an audited file, however).
°
The file description includes a RESERVE clause with a number specifying the
number of blocks to buffer. In the non-CRE environment, the number must be
greater than 1; in the CRE, it must be greater than 2.
°
The file description does not include a LINAGE clause or a CODE-SET clause.
°
The file is not opened with time limits (as with the TIME LIMITS phrase in the
OPEN statement).
°
The file’s open mode is either INPUT or OUTPUT. If it is INPUT, its exclusion
mode is PROTECTED; if it is OUTPUT, its exclusion mode is EXCLUSIVE.
°
The program is not compiled with the NONSTOP directive.
°
Regarding fast I-O and alternate keys, you must adhere to these rules:
°
If the program is compiled with ENV OLD, there must be no alternate keys
either in the SELECT statement or in the file itself.
°
If the program is compiled with ENV COMMON, there must be no alternate
keys mentioned in the SELECT statement. Any alternate keys that exist in
the file must be set to NO UPDATE with FUP.
With HP COBOL Fast I-O, the run-time routines use an auxiliary block buffer and
perform the blocking and deblocking in local storage. This can operate as much as
ten times faster than having the operating system perform the blocking and
deblocking operations.
The size of the buffer space used for reading is 2 * number *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.
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 writing is 29K characters, regardless of the
number in the RESERVE clause.