Page 1 of 1

Join multiple gdg:s

PostPosted: Wed Nov 28, 2012 7:10 pm
by Puffe
Hi,
I wonder if it's possible to join several generation datasets to one file and I want them to be copied in the order they we're created as gdg:s ?

I've tried to use utility IEBGENER but it didn't work as I wanted because the latest created gdg (G0002V00) came first in the output file (SYSUT2) and then came G0001V00.

I've got two generation file as shown below:
RXX.TEST.RXXFILE.COPY ??????
RXX.TEST.RXXFILE.COPY.G0001V00 TEST6A
RXX.TEST.RXXFILE.COPY.G0002V00 TEST6A

Then I execute this jcl:
//RXXCONC EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=RXX.TEST.RXXFILE.COPY,DISP=SHR
//SYSUT2 DD DSN=RXX.TEST.RXXCONC,
// DISP=(,CATLG),DATACLAS=TL

Sincerely,

Mikael

Re: Join multiple gdg:s

PostPosted: Wed Nov 28, 2012 7:31 pm
by NicC
Not directly. You can explicitly code each dataset in the sequence you want:
//SYSUT1 DD DSN=YOUR.DATASET.G0002V00,DISP=SHR
//       DD DSN=YOUR.DATASET.G0001V00,DIEP=SHR

or you can write a progette (probably using Rexx) to get a list of the dataset names and generate the JCL in the correct sequence.

Samples/pointers can be found in the forum as this topic has been discussed before as you would have discovered if you had done the required forum search beforehand.

Re: Join multiple gdg:s

PostPosted: Wed Nov 28, 2012 7:44 pm
by BillyBoyo
If you know how many you want, you can code as (0), (-1), (-2) etc.

Re: Join multiple gdg:s

PostPosted: Wed Nov 28, 2012 8:17 pm
by Puffe
That's the problem.
I don't know how many gdg:s I've got when I start the job.

Regards
Mikael

Re: Join multiple gdg:s

PostPosted: Wed Nov 28, 2012 8:22 pm
by Akatsukami
Well then, follow NicC's recommendation and write a tiny piece of code to determine the number of generations and their names, and tailor the JCL with them.

Re: Join multiple gdg:s

PostPosted: Wed Nov 28, 2012 8:37 pm
by Monitor
If you want to reference ALL the generations in the group, just code the group-name in your JCL
//SYSUT1 DD DSN=MY.GDG.DS,DISP=OLD              REFERENCES ALL GENERATIONS
//SYSUT2 DD DSN=MY.COMPLETE.DS,DISP=(,CATLG),   A S O   

Re: Join multiple gdg:s

PostPosted: Wed Nov 28, 2012 8:53 pm
by dick scherrer
Hello,

Please re(read) the topic. Doing as you suggest does not present the data in the needed order . .

Re: Join multiple gdg:s

PostPosted: Sun Dec 30, 2012 10:23 am
by gyt3
Hi Monitor,

I have mutiple GDG base , and i want to concatenate them.

Some GDG base might not have versions and some might be empty,

Will the job abend if the GDG base is empty ??

if so , how to handle this condition ?

Re: Join multiple gdg:s

PostPosted: Sun Dec 30, 2012 2:54 pm
by NicC
1) Please do not address posts to a specific person
2) I think Monitor has retired anyway
3) do not 'tailgate' an old topic with your new question
4) this is such a simple thing to test why do you not know the answer?
5) locked