Previous Topic: JOB Processing Subroutine for CA JCLCheckNext Topic: DD Processing Subroutine for CA JCLCheck


EXEC Processing Subroutine for CA JCLCheck

Use the EXEC processing subroutine to check anything that is specifically related to only EXEC statement processing. You can still reference the JOB statement variables as needed. Only one EXEC statement is active at any one time.

      /********************************************************************/
      /*  Exec Card processing Subroutine                                 */
      /********************************************************************/
      /*  The value of all EXEC. variables is maintained within a STEP.   */
      /*  IE: The next EXEC JCL statement causes the values to change.    */
      /********************************************************************/
A       EXEC_PROCESSING:
B       If (JOB.USERID \= 'SYSUSER') & (EXEC.PGM = 'AMASPZAP') then
       Do
       Call $CAJCL_ERROR,
       'I' 'Only system programmers can use AMASPZAP contact tech-services';
       End
C       Return
A

Defines the name of this subroutine to the DO WHILE loop.

B

When the program being executed is AMASPZAP and the USERID is not a system programmer, CA JCLCheck issues an error message. The IF statement is also comprised of the DO and CALL statements and message text lines.

The CALL statement calls the $CAJCL_ERROR subroutine, which causes CA JCLCheck to generate this severity code and error message in the associated reports if it encounters this error within the submitted JCL. See Report 6 - Error Messages at the end of this chapter to see how CA JCLCheck displays this message.

Note: You can only use the variables specified in the JOB and EXEC processing subroutines variables list under the topic Variable List for CA JCLCheck in this chapter to set up the criteria for these IF statements or any user-defined variable that may be applicable.

C

Causes control to return to the main DO WHILE loop.