Join multiple gdg:s



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Join multiple gdg:s

Postby Puffe » Wed Nov 28, 2012 7:10 pm

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
Puffe
 
Posts: 21
Joined: Mon May 02, 2011 1:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Join multiple gdg:s

Postby NicC » Wed Nov 28, 2012 7:31 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Join multiple gdg:s

Postby BillyBoyo » Wed Nov 28, 2012 7:44 pm

If you know how many you want, you can code as (0), (-1), (-2) etc.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Join multiple gdg:s

Postby Puffe » Wed Nov 28, 2012 8:17 pm

That's the problem.
I don't know how many gdg:s I've got when I start the job.

Regards
Mikael
Puffe
 
Posts: 21
Joined: Mon May 02, 2011 1:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Join multiple gdg:s

Postby Akatsukami » Wed Nov 28, 2012 8:22 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Join multiple gdg:s

Postby Monitor » Wed Nov 28, 2012 8:37 pm

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   
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: Join multiple gdg:s

Postby dick scherrer » Wed Nov 28, 2012 8:53 pm

Hello,

Please re(read) the topic. Doing as you suggest does not present the data in the needed order . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Join multiple gdg:s

Postby gyt3 » Sun Dec 30, 2012 10:23 am

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 ?
gyt3
 
Posts: 16
Joined: Sun Dec 16, 2012 9:58 am
Has thanked: 3 times
Been thanked: 0 time

Re: Join multiple gdg:s

Postby NicC » Sun Dec 30, 2012 2:54 pm

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
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post