COBOL Manual for TNS and TNS/R Programs

Program Execution
HP COBOL Manual for TNS and TNS/R Programs522555-006
12-13
PARAM Command
EXECUTION-LOG Parameter
There are three circumstances in which a COBOL program can interact with the
home terminal without your explicitly instructing it to do so:
°
A DISPLAY statement does not include an UPON phrase, so it defaults to the
OUT file, which itself is defaulted to the home terminal.
°
An ACCEPT statement does not include a FROM phrase, so it defaults to the
IN file, which itself is defaulted to the home terminal.
°
A run-time routine needs to report an error or to engage in dialog with the
system operator, and normally does so through the home terminal.
The EXECUTION-LOG parameter provides a means of redirecting such
unintentional input-output activity from the home terminal to another device, called
the execution log file.
In the CRE, the EXECUTION-LOG parameter can also redirect unintentional input-
output activity from #IN and #OUT to the execution log file.
In the absence of an EXECUTION-LOG parameter, the execution log file is the
home terminal.
If the EXECUTION-LOG parameter specifies asterisk (*), such output is discarded.
In this case, whenever the program attempts to engage the operator in dialog,
such as for:
°
Tape mount
°
Device not ready
°
No write ring
°
Printer is out of paper
The run-time routines return I-O status code “30” to the program. The special
register GUARDIAN-ERR then contains a code indicating what action is expected.
If a program has its EXECUTION-LOG parameter set to asterisk (
*), and the
program attempts to execute an ACCEPT statement that defaults to the home
terminal, the run unit terminates abnormally.
If the EXECUTION-LOG parameter specifies a file name, the processing of the
designated file depends on the device-type assigned to the file:
Device Type
Exclusion
AccessIn CRE In Non-CRE Environment
0 (process) Exclusive Shared Read/write
1 (operator console) Shared Shared Write
3 (disk) Exclusive Shared (file must exist) Write
4 (magnetic tape) Exclusive Shared Write
5 (line printer) Exclusive Shared Write
6 (terminal) Shared Shared Read/write