Previous Topic: Modifying the JOB Processing SubroutineNext Topic: Modifying the DD Processing Subroutine


Modifying EXEC Processing Subroutine

Modify this subroutine so that:

  1. Set the pgm_prefix variable equal to the first two characters of the program name.
  2. Code the step_name variable to strip out any trailing blank spaces in the EXEC.STEPNAME variable for use in an EOS error message.
  3. Code the IF statement on the following line to check for a value greater than 0. This value represents the EXEC statement PERFORM parameter. If the value is greater than 0, the following statements within the DO loop are executed.
  4. Code the following DO loop 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 the issuance of an (E) severity code level or higher.
  6. Code the IF statement on the following line so that if the address space value is equal to REAL on the EXEC statement and the user ID prefix on the JOB card is not equal to SYS, the following statements within the DO loop are executed.
  7. Code the following DO loop to call the $CAJCL_ERROR subroutine so that CA JCLCheck issues the associated (E)rror message.
  8. Code error_count= (error_count + 1) to increment the number of errors by 1 upon the issuance of an (E) severity code level or higher.
  9. Code this IF statement so that if the pgm_prefix value is equal to PS and the job user ID is not equal to CASCHED, the following statements within the DO loop are executed.
  10. Enter the following DO loop to call the $CAJCL_ERROR subroutine so that CA JCLCheck issues the associated (S)evere message.

    Note: Error_count is not incremented by 1 for this message because it is not a severity (E) or higher.

          /********************************************************************/
          /*  Exec Card processing Subroutine                                */
          /********************************************************************/
            EXEC_PROCESSING:
          pgm_prefix = SUBSTR(EXEC.PGM,1,2)
          step_name = STRIP(EXEC.STEPNAME,T)       /* Remove trailing blanks */
          If EXEC.PERFORM > 0 then
           Do
           Call $CAJCL_ERROR,
           'E','PERFORM parameter is not allowed, remove and rerun'
           error_count = (error_count + 1)
           End
          If EXEC.ADDRSPC = 'REAL' & user_prefix ¢ 'SYS' then
           Do
           Call $CAJCL_ERROR,
           'E','ADDRSPC=REAL is a restricted JCL parameter'
           error_count = (error_count + 1)
           End
           If (JOB.USERID ¢ 'CASCHED') & (pgm_prefix = 'PS') then
            Do
            Call $CAJCL_ERROR,
           'S','PRODUCTION PROGRAMS CAN ONLY BE RUN BY THE AUTOMATED SCHEDULER'
           End
          Return