Page 1 of 1

To take backup of all the GDG versions

PostPosted: Thu Nov 21, 2013 7:11 pm
by sambathjai21
Hi Friends,

I would like to know whether it's possible to take backup of all the GDG versions as a flat file?

For eg: If I provide the GDG base 'WXX080.CA99DH01.M.CONTROL.FILE.*' as input and the GDG contains some 5 version as shown below.
WXX080.CA99DH01.M.CONTROL.FILE.G0001V00
WXX080.CA99DH01.M.CONTROL.FILE.G0002V00
WXX080.CA99DH01.M.CONTROL.FILE.G0003V00
WXX080.CA99DH01.M.CONTROL.FILE.G0004V00
WXX080.CA99DH01.M.CONTROL.FILE.G0005V00

Whether it's possible to this 5 versions as backup in 5 flat files using REXX code?

Re: To take backup of all the GDG versions

PostPosted: Thu Nov 21, 2013 7:16 pm
by NicC
Why Rexx? Why not simply use IEBGENER or Sort?

Re: To take backup of all the GDG versions

PostPosted: Thu Nov 21, 2013 7:20 pm
by Robert Sample
First, you need to know that terminology is critical in IT where similar terms may mean very different things. And what you called "versions" in your post are actually "generations". Versions will be G1234V01, G1234V02, and so forth -- the generation number is the same and the version number is different. Note that only one version of a generation can be cataloged at a time, so creating G1234V01 means G1234V00 will be uncataloged.

Second, if you don't care about sequencing you can use the GDG base name, which allows you to pull in each generation starting with the newest and going to the oldest. If you care about sequencing, you will need to genreate a list of the generations (using IDCAMS or other tool of your choice) and create JCL (or code) to process them in the proper sequence.