Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading all gens of a GDG in creation sequence

Status
Not open for further replies.

RICHINMINN

Programmer
Dec 31, 2001
138
I can't find a forum that is dedicated to IBM MVS JCL, so I'll post this question here, and perhaps someone can point me to the correct forum.

I need to process all generations of a GDG in order of creation date/time. There is currently a maximum of 5 gens, but the number of gens can vary, so I can't just hardcode the gens in (-4), (-3), (-2), (-1), and (0) sequence. If I read the GDG base, I get all generations, but in newest-to-oldest sequence. (Right?) Is there some way to read the GDG base, but have the generations processed in oldest-to-newest sequence?

Thanks for your assistance.

Rich (in Minn.)
 
I don't know of an easy/transparent way of doing this

other than specifying something like this in your JCL

//DDIN DD DSN=HLQ.BASE(-5),DISP=SHR
DD DSN=HLQ.BASE(-4),DISP=SHR
DD DSN=HLQ.BASE(-4),DISP=SHR
etc ...

but you MIGHT be interested in the GDCCOPY utility from the CBT tape. It is described as

"//***FILE 482 is from Eric Bielefeld of Milwaukee, Wisconsin, and contains a program called GDGCOPY to copy GDG files, in proper order, from one GDG to another. The reason for putting this program on the CBT Tape was because of a recent discussion thread on IBM-MAIN (circa end of August 2000) about copying GDG datasets in the proper order."

You can get this file from:


See:


for general information on CBT files.

Bill Klein
 
The easiest solution to this requirement is to write a Rexx which will merge all the versions of GDG in order of old to new. Using LISTCAT will give the current no. of versions.
like:
"LISTC ENT "<GDG base>

Try it out.

All the best.

Cheers,
Tushar Patil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top