This processing subroutine is invoked for every statement encountered in the JCL. You can place any logic here you want. 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.
/********************************************************************/
/* Raw Data processing Subroutine */
/********************************************************************/
A RAW_DATA_PROCESSING:
B $CA.RCOUNT = $CA.RCOUNT + 0
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
Defines the name of this subroutine to the DO WHILE loop.
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 and $CA.RSTYPE is a variable that contains a description of the statement type (for example, JOB/EXEC/DD/COMM (comments)).
Returns processing to the main DO WHILE loop.
|
Copyright © 2014 CA.
All rights reserved.
|
|