Previous Topic: Modifying the END-OF-JOB Processing SubroutineNext Topic: JCLNeat Original JCL Report


RAW Data Processing Subroutine

Modify this subroutine to check for statements that need to be deleted from or commented out of the JCL.

  1. Code the first IF statement to determine whether the delete_flag was set during dd_processing. If the delete flag is set to Y, execute the following statements in the DO loop.
  2. Code the following DO loop to set the record count to 0 to indicate that this statement is to be deleted. The DO loop sets the delete flag back to N after the statement is deleted.
  3. Code the IF statement on the following line to determine whether the comment flag was set during dd_processing. If the comment flag is set to Y, execute the following statements in the DO loop.
  4. Code the following DO loop to set each record for this statement to a comment. The DO loop sets the delete flag back to N after the statement is deleted.
          /********************************************************************/
          /*  Raw Data Processing  Logic                                     */
          /********************************************************************/
          RAW_DATA_PROCESSING:
           IF delete_flag = 'Y' Then
            Do
           $CA.RCOUNT = 0   /* Setting record count to zero deletes statement */
           delete_flag = 'N'     /* Reset flag */
          End
           IF comment_flag = 'Y' Then
            Do
          $CA.RCOUNT = $CA.RCOUNT + 0
             Do n = 1 to $ca.rcount
              temp_work = SUBSTR($CA.RECORD.n,3,77)
              temp_record = '//*'temp_work
              $CA.RECORD.n = temp_record
             End
           comment_flag = 'N'     /* Reset flag */
          End
          Return