COBOL Manual for TNS and TNS/R Programs
Environment Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
6-73
RECEIVE-CONTROL Paragraph
MESSAGE-TYPE
is one of:
ENTRY-NUMBER
is the number assigned to the receive-control table entry for a requesting process.
It is in the range set by table-length. When certain system messages not
associated with any requester, such as CPU-UP and CPU-DOWN, are received,
the number is 0.
PROCESS-ID
is the 8-byte operating system process ID. The first 6 characters are the process
name or a timestamp for an unnamed process. The last 2 characters are the
processor number and process number.
PHANDLE
is a unique identifier that specifies a process to process-related procedure calls (for
more information, see the Guardian Programmer’s Guide).
REPORT Phrase
Normally, the $RECEIVE mechanism automatically intercepts and processes all
messages sent to the run unit by the operating system. By specifying the REPORT
clause, you state that the $RECEIVE mechanism is not to intercept certain classes of
system messages, but pass them back to the program for processing. The program
then supplies the appropriate error code (if the ERROR CODE clause appears), and
generates the appropriate response (by performing a write operation or another read
operation on $RECEIVE).
In the non-CRE environment, the file accepting messages through $RECEIVE must
have a record length of at least 34 characters when system messages are received. In
the CRE, the file must have a record length of at least 255 characters.
“System” is an abbreviation for the messages that are generated under program
control.
Example 6-10. MESSAGE SOURCE Phrase (CRE)
01 SOURCE-MESSAGE.
05 MESSAGE-TYPE PICTURE S999 USAGE IS COMPUTATIONAL.
05 ENTRY-NUMBER PICTURE 999 USAGE IS COMPUTATIONAL.
05 FILLER PICTURE X(4).
05 PHANDLE PICTURE X(20).
05 FILLER PICTURE X(4).
Value Meaning
Zero or greater Message sent by the requesting process
Less than zero Message sent by the operating system