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

Figure 6 Reply Table
Reply messages saved in the reply table are identified by their requester process. These messages
correspond to and answer the specific requester.
For example, if REQUESTER PROCESS 3 in Figure 6 failed before it received REPLY MESSAGE 5,
and its backup reissued the request based on the checkpoint information, the COBOL fault-tolerant
facility would recognize that the request was performed. It would reissue REPLY MESSAGE 5 to
REQUESTER PROCESS 3 without re-executing the request.
If a Receive-Control paragraph has no reply table (no SYNCDEPTH LIMIT and REPLY CONTAINS
clauses), then replies are not saved. The fault-tolerant facility cannot retransmit them. If a requester’s
backup process retransmits them, they are not recognized as duplicate requests, because the
originals were not saved. Responding to duplicate messages can corrupt the database.
ERROR CODE Phrase
The ERROR CODE phrase of the RECEIVE-CONTROL paragraph provides a way for a server
process to appear as a device to its requesters. When the server process sends an error code to
a requester, the server process uses file-system error codes to set the ERROR CODE item. How the
server process sets the ERROR CODE item depends on the device type of the device the server is
simulating.
When the server makes a reply to a READ on $RECEIVE, the operating system passes back the
value of the ERROR CODE item separately from the reply-message text. Additionally, the system
passes back a condition code (CCE, CCG, or CCL) based on the value of the file-system error
number. (See the Guardian Programmer’s Guide for information about file-system errors and
condition codes.)
The requester checks for a condition code other than CCE (successful operation) after its action to
send a task message and receive a response. If there is an error (CCG or CCL), the requester must
call FILEINFO, a system procedure, to determine the error code (from ERROR CODE item) passed
by the operating system. When a requester process is written in COBOL, condition code checking
(including the call to FILEINFO) is handled by the COBOL run-time library routines.
148 Environment Division