View previous topic :: View next topic
|
Author |
Message |
anandkumarrn
New User
Joined: 06 Feb 2009 Posts: 23 Location: India
|
|
|
|
Hi,
I need a JCL,
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??? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
JCL cannot do this. . . Some program must be executed. . .
It might be the sort or fileaid or some other utility, but it will not happen using only jcl.
Suggest you look within the forum as there are many similar topics. If you find something that is not clear, post what you found and your doubt. SOmeone will be able to clarify. |
|
Back to top |
|
|
itjagadesh
New User
Joined: 05 Dec 2006 Posts: 89 Location: chennai
|
|
|
|
Hi,
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
HEADER|FIRST|HEADER(x)|FIRST(x)
RRN(x)|RRN(x,y)|RRN(x,) ...
TRAILER|LAST|TRAILER(x)|LAST(x)
USING(xxxx) VSAMTYPE(x)
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.
Thanks,
Jagadesh. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
itjagadesh,
How does this relate to the original requirement posted by the TS?
anandkumarrn,
Why dont you write a little code to achieve this? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
vasanthz,
Yes, Of course it's a really good book. Can you point out the trick in the above document which relates to the topic under discussion here.
I am confused. |
|
Back to top |
|
|
|