Previous Topic: Modifying the DD Processing SubroutineNext Topic: Modifying the END-OF-JOB Processing Subroutine


Modifying the END-OF-STEP Processing Subroutine

Change this subroutine so that CA JCLCheck:

  1. Code the first IF statement to determine the number of cartridges found within the current step. If the number is greater than four, the following statements within the DO loop are executed.
  2. Code the DO loop on the following line to call the $CAJCL_ERROR subroutine so that CA JCLCheck issues the associated (W)arning message.
  3. Code the second IF statement to determine the number of DD statements found in the current step. If the number is greater than ten, the following statements within the DO loop are executed.
  4. Code the DO loop on the following line to call the $CAJCL_ERROR subroutine so that CA JCLCheck issues the associated (E)rror message.
  5. Code the error_count= (error_count +1) to increment the number of errors by 1 upon issuance of an (E) severity code or higher.

    Note: The levels of severity code are assigned as follows: I = 0, W = 4,
    E = 8, S = 12. This adheres to normal CA JCLCheck error severity.

  6. Code dd_count variable=0 to reset the DD counter to zero for use if there is another step in the JCL.
  7. Code cart_count variable=0 to reset the cartridge counter to 0 for use if there is another step.
          /********************************************************************/
          /*  Step End  processing Subroutine                                */
          /********************************************************************/
          END_STEP_PROCESSING:
          If (cart_count > 4) then
           Do
           Call $CAJCL_ERROR,
           'W','Step 'step_name' is using 'cart_count' cartridge drives, please
          reduce utilization'
           End
          If (dd_count > 10) then
           Do
           Call $CAJCL_ERROR,
           'E','Step 'step_name' has specified 'dd_count' DD names, this exceeds site
          standards'
           error_count = (error_count + 1)
           End
          dd_count = 0
          cart_count = 0
          Return