I have to count the number of active records(an indicator set to 'A') in a VSAM files and the VSAM file contains huge amount of data.
I have to start reading the records based on my input value(i.e. starting position of read to start processing) not from the first record of my file.
say i need to count first 1000 active records out of 5000 records. I need to start reading the records from 2500th record not from the first record. and i need to get the output as
Total active records:1000 records and
Processed records till: 4000(this 4000 is the number of records i have processed to get the 1000 active records).
I need this to be done thru JCL. Can any one help me???
We can try to acheive this using Option "SUBSET" available.
SUBSET is a new ICETOOL operator that allows you to create a subset of the input or output records with specific header, trailer, and relative records, or without specific header, trailer, and relative records. SUBSET gives you new capabilities for keeping or removing the first n records of your data set, the last n records of your data set, and/or specific relative records in your data set. SUBSET does not require an "identifier" in the records to be kept or removed; it keeps track of the first n records, relative record numbers, and the last n records automatically.
The syntax for the SUBSET operator is as follows:
SUBSET FROM(indd) TO(outdd) DISCARD(savedd) KEEP|REMOVE INPUT|OUTPUT
Example: As an example, you could use the following SUBSET operator to keep the first two input records, the fifth, sixth and seventh input records, and the last input record.
SUBSET FROM(IN) TO(OUT) KEEP INPUT FIRST(2) RRN(5,7) LAST
Do let me know if you need any further detail on this option SUBSET.