COBOL Manual for TNS and TNS/R Programs

Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs522555-006
13-110
CHECKMESSAGE
CHECKMESSAGE
The CHECKMESSAGE routine determines whether a specific message exists or
reports the greatest message number of the saved ASSIGN messages.
CHECKMESSAGE operates on the saved messages. The program must have
included a SAVE directive to save the message.
The general form of the ENTER statement to use CHECKMESSAGE is:
library-reference
is a mnemonic-name associated in the SPECIAL-NAMES paragraph with either
$SYSTEM.SYSTEM.COBOLLIB or some other object file containing an object
copy of CHECKMESSAGE.
message-number
identifies a specific message. message-number can be a DISPLAY or
COMPUTATIONAL numeric data item, a numeric literal, or an expression enclosed
in parentheses. The value for message-number must be -3, -1, 0, or a
nonnegative integer. The values of message-number have these meanings:
Because each saved ASSIGN message is identified by a positive integer,
message-number refers to the integer value of the specific message. The set of
numbers associated with the ASSIGN messages are integers from 1 to N, where N
is normally the number of ASSIGN messages saved during the initial process
creation. Example:
03 MESSAGE-NUMBER PIC S9999 COMPUTATIONAL.
Value of message-number Meaning
-3 Checks for the presence of a saved PARAM message
-1 Checks for the presence of a saved startup message
0 Requests the greatest message number in the set of
saved ASSIGN messages
Nonnegative integer Checks for the presence of a saved ASSIGN message
with that message number
ENTER
"
TAL
"
ns
USING
library-referenceOF
resultGIVINGmessage-number
CHECKMESSAGE
ns
VST353.vsd