To issue a message with check results in your check
routine, you must use the HZSFMSG macro (HZSFMSG macro — Issue a formatted check message),
which you can issue in either an assembler or Metal C check routine.
This section only covers using the HZSFMSG macro to issue a message,
but a message also consists of a few other ingredients. When your
check runs, the system assembles the message from the following:
Note that you can omit the message table and issue messages
directly from the check routine in one of the following ways:
You can issue the following kinds of messages in your check routine:
- Exception messages and other check results messages (CHECKMSG or DIRECTMSG request). For an overview of the various
message types, see Table 1.
- IBM Health Checker for z/OS messages
(HZSMSG request)
- IBM Health Checker for z/OS messages
that indicate that the check is stopped (STOP request). If your check
routine issues HZSFMSG with the STOP request, it prompts the system
to call the delete function code for the check.
You can issue a particular message multiple times in a single
iteration of a check - a check routine should always issue an exception
message to report an error.
For a remote check, the HZSFMSG macro call must:
For example, a remote check might issue a check exception message
with the following HZSFMSG macro call:
HZSFMSG REQUEST=CHECKMSG,MGBADDR=Addr_Of_MGB1,
MGBFORMAT=1,
REMOTE=YES,HANDLE=CK_Handle,
MsgTable=Addr_Of_MsgTable,
MF=(E,HZSFMSG_List)
Check messages are important because they report the results of
the check to an installation. Each check should issue at least:
- One or more messages for any exception found to the setting the
check is looking for.
- A message indicating that no exceptions were found, when appropriate.
If an HZSFMSG macro call is incorrect, the system issues system
abend
X'290' with a unique reason code and creates a logrec
error record. The system checks the following for each HZSFMSG call:
- To see that the HZSMGB data area (input to checks describing message
identifiers and variables) is complete
- That the message is in the message table
- That the number of inserts provided on the call exactly matches
the number required to complete the message
- That each variable definition is between 1-256 characters long
The reason codes for system abend
X'290' describe the
message error. See
z/OS MVS System Codes.
HZSFMSG updates the PQE_Result field in the HZSPQE as follows:
- For a specified severity of HIGH, the system sets the check result
to 12
- For a specified severity of MEDIUM, the system sets the check
result to 8
- For a specified severity of LOW, the system sets the check result
to 4
PQE_Result is set to 0 when the check is called. See
Examples.
For information on coding the message texts and explanation for
messages, see Issuing messages in your local check routine with the HZSFMSG macro.