Doudt in GDG...



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

Doudt in GDG...

Postby Purushoth » Mon Nov 01, 2010 10:17 am

In my JCL, In step1 I'll gonna create a new generation dataset for that I gave GDG Name(+1). In step2 and Step3 I wanna to use same dataset created by step1? What number i should give to refer that dataset?(here, step1 executed successfully) and i need valid reasion too?
Purushoth
 
Posts: 7
Joined: Mon Nov 01, 2010 10:05 am
Has thanked: 0 time
Been thanked: 0 time

Re: Doudt in GDG...

Postby dick scherrer » Mon Nov 01, 2010 10:30 am

Hello and welcome to the forum,

Use +1 to reference the newly created gdg generation within that job.

and i need valid reasion too?
What does this mean? What kind of reason might be needed?
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: Doudt in GDG...

Postby NicC » Mon Nov 01, 2010 10:41 am

When creating and using a GDG within a job it is usually best to create the dataset as a workfile and use that in subsequent steps. At the end of the job, or usage of the dataset within the job, copy the dataset to its GDG name +1. This avoids job restart problems.
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: Doudt in GDG...

Postby steve-myers » Mon Nov 01, 2010 10:56 am

NicC's idea is excellent, though it is not always a good idea, especially if the data set is large.

The naming rule for GDG data sets is that within a job, each relative generation always refers to the same data set. In other words, if STEP1 creates relative generation +1, use +1 in a subsequent step to refer to the same data set as was created in STEP1.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Doudt in GDG...

Postby dick scherrer » Mon Nov 01, 2010 11:01 am

Hello,

If the job runs from a PROCedure (and many/most do), the reletive generation can be a symbolic parameter that has a default of +1 and for a restart zero can be used. Makes restarts much easier. . .
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: Doudt in GDG...

Postby NicC » Mon Nov 01, 2010 1:12 pm

Makes restarts much easier if you do not have to change ANYTHING :D At one place we had 2 systems of ensuring that a job restarted at the correct step. Workfile deleteion, database restores all automatic.
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: Doudt in GDG...

Postby Purushoth » Mon Nov 01, 2010 2:46 pm

:) Thanks a lot for ur suggestion abt ma question. I am Purushoth from India..may i knw from whom i got the answers and where u from?
Purushoth
 
Posts: 7
Joined: Mon Nov 01, 2010 10:05 am
Has thanked: 0 time
Been thanked: 0 time

Re: Doudt in GDG...

Postby enrico-sorichetti » Mon Nov 01, 2010 2:54 pm

..may i knw from whom i got the answers and where u from?

will it make any difference in understanding the replies and judging their usefulness for Your environment ?
there is no reason to invade anybody' s privacy with personal questions!

the preferences on the userids used on public forums range from ...
a completely obfuscated nickname to a full name/last_name
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Doudt in GDG...

Postby Phrzby Phil » Wed Nov 03, 2010 12:29 am

Control-M automatically handles the generation# on restart.
Phrzby Phil
 
Posts: 7
Joined: Wed Jun 30, 2010 8:02 am
Has thanked: 0 time
Been thanked: 0 time


Return to JCL