Previous Topic: The $JCLENT MacroNext Topic: The $JCLGETM Macro


The $JCLERR Macro

This macro issues error messages, and an exit routine can place those messages in Report 6 - Error Messages.

This macro stores an error message for the statement whose SPB (statement pointer block) is addressed by register 9; so an exit routine can store a message for any statement by loading the appropriate SPB address into register 9. If R9 is zero, CA JCLCheck uses the SPB for the JOB statement.

A routine issuing a message must pass any required parameters (variable text) in the $WA field of the global area. Each parameter consists of a one‑byte field containing the length-minus-1 of the variable text, followed by the text itself. The error formatting routine strips trailing blanks from the text and then inserts it into the message, surrounded by single quotes. You can provide a numeric parameter by specifying a length field of X'80', followed by a three‑byte binary value.

If CA JCLCheck requires multiple parameters, you must specify them in succession in the $WA, with the length field of each parameter immediately following the last text character of the preceding parameter.

It is acceptable for the variable parameters to overflow the 80-byte $WA field into the $ABDPSW and $ABDREGS field. The remaining fields in the global area ($ABDPSW and $ABDREGS) are used only if CA JCLCheck encounters a program check during execution.

This macro has the following format:

-label-    $JCLERR message number
label

Defines a reference point.

label is eight alphanumeric characters in length.

message number

Defines the number of the $DMSG macro defining the message.