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

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:
AccessExclusionDevice Type
Read/writeExclusive0 (process)
WriteShared1 (operator console)
WriteExclusive3 (disk)
WriteExclusive4 (magnetic tape)
WriteExclusive5 (line printer)
Read/writeShared6 (terminal)
The file is opened the first time the run unit attempts to write a message. This means that it will
not be opened at all for most jobs. If the open operation fails, no messages can be written
anywhere and run unit execution terminates abnormally. Once opened, the file remains open
for the duration of the run unit.
If any error occurs during a write or read operation on the execution log file, no messages
can report this problem and the run unit terminates abnormally.
If the access mode is read/write, the run-time routines use the WRITEREAD system routine to
send messages requiring a response and WRITE for messages not requiring a response.
If the access mode is write, the run-time routines use a WRITE request for all messages. Those
requiring a response are assumed to have a response of end of file.
If the device is a process, the process is responsible for analyzing the messages to determine
if an operator response is needed. If the process is also a COBOL run unit, it can do this by
using the MESSAGE-SOURCE option in its (the process’s) RECEIVE-CONTROL paragraph to
get the appropriate information to use in an ENTER RECEIVEINFO call. If RECEIVEINFO returns
a nonzero value for the read-count, a reply is expected. In this case, the process can return
an appropriate string value (such as would be supplied by an operator) indicating what action
to take.
If a reply is null or the access mode of the execution log is write, the run-time routines assume
that no action is desired and, if the operation is a file processing statement, return I-O Status
30 to the program (GUARDIAN-ERR contains the code indicating what action is expected). If
PARAM Command 589