John, Would this code account for a V01 - V99 ending in the GDG? And would it handle the fact that the next GDG might not be a G9999Vxx but maybe a G0001Vxx? Remember GDG numbers at the back can wrap a little differently. A -1 might not be what you think it might be.
I think, there is some ambiguity regarding the correct chronological order in the GxxxxVxx numbers over 9000. Lizette > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] On > Behalf Of John McKown > Sent: Wednesday, May 25, 2016 1:34 PM > To: [email protected] > Subject: Re: Proper way to resolve existing GDG GnnnVnnn by relative reference > > On Wed, May 25, 2016 at 2:58 PM, Kirk Wolf <[email protected]> wrote: > > > I want to resolve an existing GnnnVnn for a GDG using a (0) or (-n) > > reference, but in this case I don't want to allocate the data set. > > > > Is there a better way than to list the HLQ.GDG.* catalog entries with > > IGGCSI00 and then pick off the minus nth entry? (is this even correct in > > all cases?) > > > > > > BTW - I always want the "latest" table (for BPXWDYN, this is "GDGNT" ) > > > > Thanks, > > > > Kirk Wolf > > Dovetailed Technologies > > http://dovetail.com > > > > > Kirk, perhaps you've heard of this wonderful product called Co:Z? <big > grin> > > Using COZPROC > > catsearch -m 20000 'HLG.GDG.**' |\ > egrep '^HLG\.GDG\.G[0-9]{4}V00$' |\ > awk '$1 == "HLQ.GDG.G....V00" {gen=NR;} END {print "(" gen-NR ")";}' > # replace .... above with the absolute generation number. > > The above does make the assumption that you don't use the NOSCRATCH option so > that all the matching named data sets are in "rolled in" status. > > > -- > The unfacts, did we have them, are too imprecisely few to warrant our > certitude. > > Maranatha! <>< > John McKown > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
