View previous topic :: View next topic
|
Author |
Message |
jetumax
New User
Joined: 02 Dec 2005 Posts: 8 Location: Mysore, INDIA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
jetumax
New User
Joined: 02 Dec 2005 Posts: 8 Location: Mysore, INDIA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
jetumax
New User
Joined: 02 Dec 2005 Posts: 8 Location: Mysore, INDIA
|
|
|
|
Thanks alott . I have used rexx ... its working... I thought we can make it work using JCL...but its ok |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
|