COBOL Manual for TNS and TNS/R Programs

Environment Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
6-70
RECEIVE-CONTROL Paragraph
Topics:
Receive-Control Table
Reply Table
ERROR CODE Phrase
MESSAGE SOURCE Phrase
REPORT Phrase
Receive-Control Table
The receive-control table, an internal table, is required for $RECEIVE operation. Its
purpose is to identify, by the PROCESS-ID, which requesting processes have opened
the server process.
The compiler allocates only one receive-control table because only one file assigned to
$RECEIVE can be open for input or input-output at a time. When more than one
program unit defines a receive-control table, the compiler reserves space for the
largest table.
In the Pathway environment, the value of table-length for a server must be
greater than or equal to the value of the MAXLINKS parameter in the server-class
definition for the server.
When the number of active requesters fills the receive-control table, OPEN messages
from new requesters are refused with a run-time error message and are not reported to
your program. OPEN messages received from backup processes of active requesters
are still accepted and reported.
Reply Table
When reply messages are sent back to the requesting processes, the COBOL compiler
constructs a second internal table in which to save the replies. The reply message
includes the sync-id and the contents of the reply.
Table 6-7. Receive-Control Table Example
Entry Number Requesting Process
1 REQUESTER PROCESS 1
2 REQUESTER PROCESS 2
3 REQUESTER PROCESS 3
……
100* REQUESTER PROCESS 100
* The number of entries in the receive-control table is defined by table-length.