IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To pick up the oldest generation in a GDG


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jetumax

New User


Joined: 02 Dec 2005
Posts: 8
Location: Mysore, INDIA

PostPosted: Tue Apr 03, 2007 1:09 pm
Reply with quote

Hi,

i have a requirement in which i have to process the version of GDG in FIFO manner (First In First Out) i.e. i want to pick up the oldest version under a particular GDG base, process it , delete it and for the next run pick up the other oldest version.

This goes on , till all the versions are processed and thereby delted.

i hope i was clear enough in stating my requirement.
waiting for your valuable replies.

thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 03, 2007 1:17 pm
Reply with quote

Can you explain your situation as to why you need to operate in this manner. It may be that the members of this forum can come up with a better solution to your requirement.

The unfortunate thing about using GDGs in the manner described is that they could change during processing, so by using the relative generation may give incorrect results.

The safest way is to use the absolute generation.

Why can you not just process the whole GDG base in one hit. That's what I'd try to do first.
Back to top
View user's profile Send private message
jetumax

New User


Joined: 02 Dec 2005
Posts: 8
Location: Mysore, INDIA

PostPosted: Tue Apr 03, 2007 2:48 pm
Reply with quote

Thanks for consideration.

But the generation for given GDG will be created simultaneously when above mention process is going on.

Some other job will be creating new generations and our new job have to read first in first out (oldest to latest generation) , process it and then delete it till any of the generations left for that GDG.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 03, 2007 3:00 pm
Reply with quote

Then you will probably need a REXX or something to process the output from a LISTCAT to get the absolute generation number to process.
Back to top
View user's profile Send private message
jetumax

New User


Joined: 02 Dec 2005
Posts: 8
Location: Mysore, INDIA

PostPosted: Fri Apr 06, 2007 7:51 pm
Reply with quote

Thanks alott . I have used rexx ... its working... I thought we can make it work using JCL...but its ok
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Mon Apr 09, 2007 5:27 pm
Reply with quote

JCL:

1. Run IDCAMS LISTCAT; the report will list all existing generations
2. Input this report into a program and pull off the first generation listed
3. Have the program create the JCL you want using the generation you pulled from the report
4. Submit your generated JCL via the internal reader

I didn't say it was trivial, but it works.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Report generation JCL & VSAM 18
No new posts How can I get Generation Nbr of GDG f... IBM Tools 1
No new posts Sequence number generation for multip... DFSORT/ICETOOL 2
Search our Forums:

Back to Top