Previous Topic: EOJ Processing Subroutine for JCLNeatNext Topic: NJB Processing Subroutine for JCLNeat


RAW Data Processing Subroutine JCLNeat

The Raw Data processing subroutine is invoked for every statement encountered in the JCL. You can place any logic here. For example, you can keep a count of total jobs processed or, the number of jobs with specific accounting information, and so on.

You can use the IF statement to interrogate all of the same variables as for the DD and EOS statements (that is, the last generation of JOB/EXEC/DD variables). Only one generation of each statement type is active at any one time.

To update the RAW DATA records:

  1. Place the changed images into the $CA.RECORD.n variables.
  2. Set the $CA.RCOUNT variable to the number of JCL images associated with the revised JCL statement.
  3. Set the $CA.RSTYPE variable to "UPDA".
  4. Return Control to CA JCLCheck.

Note: Do not set the update ("UPDA") indicator unless the JCL image has been changed as this will cause an endless loop between the REXX routine and CA JCLCheck.

    /********************************************************************/
    /*  Raw Data Processing  Logic                                      */
    /********************************************************************/
A     RAW_DATA_PROCESSING:
B     $CA.RCOUNT = $CA.RCOUNT + 0
       SAY ' Raw Data Processing logic entered'
       SAY '    Record Count IS:' $CA.RCOUNT
       SAY '       STatement Type IS:' $CA.RSTYPE
       DO n = 1 to $ca.rcount
        SAY 'Data: ' $CA.RECORD.n
       END
C     Return
A

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

B

Issues a SAY command for each logical input record comprising the statement. The variable $CA.RCOUNT is a count of the total number of records for this statement, $CA.RSTYPE is a variable that contains a description of the statement type (for example, JOB/EXEC/DD/COMM (comments)), and $CA.RECORD.n is an array of variables containing the actual RAW JCL records. There are as many variables as the total of $CA.RCOUNT.

C

Returns processing to the main DO WHILE loop.