Previous Topic: The Initialization and DO WHILE Loop for CA JCLCheckNext Topic: INITIAL Processing Subroutine for CA JCLCheck


$CAJCL_ERROR Subroutine for CA JCLCheck

You call this subroutine from the other subroutines (JOB/EXEC/DD/EOS/EOJ) in the REXX EXEC to issue CA JCLCheck error messages. All REXX interface messages are prefixed with CAY6341 and can be written in uppercase or lowercase. The severity and user text appear after the prefix.

      /********************************************************************/
      /*  Internal subroutine to issue a CA JCLCheck error message        */
      /********************************************************************/
A       $CAJCL_ERROR:
B       PARSE ARG $CAJCL_SEVERITY,$CAJCL_MESSAGE
C         CALL 'CAZ1JRXE' $CAJCL_PARM $CAJCL_SEVERITY $CAJCL_MESSAGE
D       Return
      /*                                                                  */
A

Defines the name of this subroutine.

B

Obtains the values specified on the CALL command from subsequent subroutines to this subroutine.

C

Calls the REXX interface module that issues CA JCLCheck messages.

D

Returns control to the next statement within the subroutine that called this subroutine.

Prior to calling this subroutine from a subsequent subroutine, set the message text values. Here, $CAJCL_SEVERITY contains the severity of message (I=Informational, W=Warning, E=Error, or S=Serious) that you set within the call for this subroutine in the subsequent subroutines. The condition codes for severity are assigned as follows: I = 0, W = 4, E = 8, S = 12. This adheres to normal CA JCLCheck error severity code standards.

This subroutine is invoked from the remaining subroutines as follows:

Call $CAJCL_ERROR 'E' 'message text';

The 'E' in this line of code would issue a severity 8 error containing the 'message text'. For example, the JOB statement subroutine contains the following lines of code to define an error message:

Call $CAJCL_ERROR,
'E' 'This class is reserved for Scheduled jobs';