COBOL Manual for TNS and TNS/R Programs
Input and Output Concepts
HP COBOL Manual for TNS and TNS/R Programs—522555-006
26-10
Prereading File Records
Prereading File Records
To save execution time by overlapping reading and processing, the HP COBOL run-
time routines perform record prereading (starting the read for record n +1 when
returning record n to the program) when all of these conditions are true:
•
File access mode is SEQUENTIAL.
•
File open mode is INPUT.
•
File exclusion mode is PROTECTED (for a disk file) or EXCLUSIVE (for a disk or
nondisk file).
•
The process is not running as a process pair.
•
The file is not open for timed I-O.
Verify that the prereading requirements are not met when the HP COBOL process
does any of:
•
Enters a TAL routine to do input or output
•
Executes the read operation as part of a TMF transaction (enters
BEGINTRANSACTION, executes a READ statement, then enters
ENDTRANSACTION)
•
Executes a CLOSE NO REWIND statement on a tape file and subsequently
executes an OPEN NO REWIND statement on the same file to continue from the
previous position
Processes Handled as Files
One process calls another by handling it as a file. If the calling process is an
HP COBOL program, it refers to the called process by a COBOL file name. Like
COBOL file names of files that are not processes, the COBOL file name of a process
must be associated with a file name that the operating environment recognizes (the
process name or process descriptor). For more information about processes, see
Section 31, Process Initiation, Communication, and Management.
Intercepting Operating System Messages
The operating system sends messages to processes, reporting such things as:
•
Break was pressed on a terminal.
•
A descendant process has terminated (normally or abnormally).
•
Another process with which you are communicating has opened you or closed you.
•
ASSIGN, PARAM, and startup messages were sent to you from your parent
process (Guardian environment only).