Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need JCL to start reading the records from 2500th record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
anandkumarrn

New User


Joined: 06 Feb 2009
Posts: 23
Location: India

PostPosted: Tue May 26, 2009 1:18 am    Post subject: Need JCL to start reading the records from 2500th record
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 26, 2009 2:18 am    Post subject:
Reply with quote

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
View user's profile Send private message
itjagadesh

New User


Joined: 05 Dec 2006
Posts: 89
Location: chennai

PostPosted: Tue May 26, 2009 2:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Tue May 26, 2009 8:18 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1506
Location: Chennai

PostPosted: Tue May 26, 2009 9:40 pm    Post subject:
Reply with quote

Try this link. Its a must read book by Frank (Really good)

http://www-947.ibm.com/systems/support/storage/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2284
Location: @my desk

PostPosted: Tue May 26, 2009 10:48 pm    Post subject:
Reply with quote

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. icon_rolleyes.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us