View previous topic :: View next topic
|
Author |
Message |
knobi
New User
Joined: 16 Aug 2005 Posts: 55
|
|
|
|
I need to run a job (icetool) that reads all GDGs except the last one.
Since the number of generations may vary, Is there any way to specify in the JCL to keep the last dataset out ?
Or do i need list the GDG base thu REXX and build the JCL dynamically, submitting it thru internal reader ? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You are going to need to do something to generate the JCL and arrange to have it submitted.
When framing questions, remember also that we don't know what you mean by "last one" even though you do. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I need to run a job (icetool) that reads all GDGs except the last one. |
Your post is remarkably non-specific. As worded, it appears that you want to read every GDG that is defined on your system (except one) -- potentially many hundreds or thousands of bases.
Assuming you really mean to read all generations of a single GDG, when you say "except the last one" -- do you mean the newest generation or the oldest generation? Either could legitimately be considered the "last" generation.
And, as otherwise stated, you will have to generate your JCL dynamically and submit it (via the internal reader) to the system. JCL really has no way to do what you are asking for. |
|
Back to top |
|
|
Paul Voyner
New User
Joined: 26 Nov 2012 Posts: 52 Location: UK
|
|
|
|
Shooting in the dark here, since there's so little information to go on:
Assuming, say, you have 20 generations for a particular GDG, why not reference my.gdg(-1) to my.gdg(-20) and leave out my.gdg(0) ? |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 590 Location: London
|
|
|
|
Paul Voyner wrote: |
Shooting in the dark here, since there's so little information to go on:
Assuming, say, you have 20 generations for a particular GDG, why not reference my.gdg(-1) to my.gdg(-20) and leave out my.gdg(0) ? |
Seems the number of generations varies, otherwise that would work. So looks like he'll have to at least get the list first, e.g. with IDCAMS:
LISTCAT LEVEL(GDG.BASE.NAME.G%%%%V%%) NAME
and feed it into a JCL generator, or do it manually which would probably be just as quick.
Not sure if it matters if any GDS's are deferred or rolled-off status, but changing NAME to ALL reveals the status. |
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
Assuming, it is the oldest generation you want to skip And you know the number of records in that generation (and that is very highly unlikely), then you can use Sort to copy all records on GDG Base with Skiprec parameter to get desired output. |
|
Back to top |
|
|
|