COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

DEFINE Name
NOTE: This topic applies only to the Guardian file system. DEFINEs do not accept OSS pathnames.
If the file-control entry assigns the COBOL file name (the file-name in the SELECT clause) with
a DEFINE name (the define-name-literal in the ASSIGN clause), then you must associate
the DEFINE name with a system file name before executing the program (see Adding DEFINEs
(page 820)). Even when the program executes in the OSS environment, the DEFINE must specify a
Guardian file name, tape device, or spooler.
These SELECT and ASSIGN clauses associate the COBOL file name MAJRACCT with the DEFINE
name =BIGCUST:
SELECT MAJRACCT
ASSIGN TO "=BIGCUST"
This command associates =BIGCUST with the system file \AKRON.$SLB.MAJ.ACC:
ADD DEFINE =BIGCUST, FILE \AKRON.$SLB.MAJ.ACC
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:
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 Chapter 31: Process Initiation, Communication, and Management (page 915).
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).
An HP COBOL process ignores operating system messages unless you arrange to have it intercept
them. To have an HP COBOL process intercept operating system messages, you must include
REPORT and MESSAGE SOURCE clauses in its RECEIVE-CONTROL paragraph.
836 Input and Output Concepts