Robert,

Actually (tested on z/OS 1.11), it didn't matter whether I had DISP=OLD or 
DISP=SHR on my GDG(0), any other jobs submitted while the allocate job was 
running waited until the allocate of (+1) was complete and cataloged, then each 
grabbed the new generation as GDG(0).  

Rex

-----Original Message----- 
From: Robert A. Rosenberg
Sent: Sunday, October 27, 2013 4:49 PM Subject: Re: GDG question

At 10:57 -0700 on 10/26/2013, Jon Perryman wrote about Re: GDG question:
>Job's that want to reference the current GDG will use (0). Creating the new 
>version (+1) does not delay use of (0). If you require others wait for the 
>new version (+1), then you will need DISP=OLD for the (0) GDG while 
>creating the new version. GDG's (0), (+1), (+2), ... (-1), (-2),.. are each 
>unique datasets. The only commonality is they are referenced thru the GDG 
>name. Treat them as different datasets.

One warning about relative generation numbers. Lets say the current
generation number is 1234. A job that reads GDG(0) and creates
GDG(+1) will create generation 1235. While the job is still running,
GDG(0) will stay as 1234 even to jobs that start while the create job
is running. As soon as it ends GDG(0) becomes 1235 while GDG(-1) will
now be 1234. Any job that was running during the create job will keep
its GDG(0) reference as 1234 even in steps that start after the
creating job ends and GDG(0) becomes 1235 - IOW: Who is GDG(0) is
fixed when the job starts and is not affected by the creation of
additional generations. This can cause problems if you code GDG(0) as
DISP=OLD in a create job since all jobs that launch after it starts
and reference GDG(0) will wait for that job to end BUT since that job
creates a GDG(+1), the waiting jobs have already decided what
generation is GDG(0) and thus will actually be working with GDG(-1)
not the newly created generation when they run. I do not know of a
way to insure you are getting GDG(+!) when you reference GDG(0) by
waiting for it to be finished being created - You always get GDG(0)
at the time you get launched.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

The information contained in this message is confidential, protected from 
disclosure and may be legally privileged.  If the reader of this message is not 
the intended recipient or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any disclosure, 
distribution, copying, or any action taken or action omitted in reliance on it, 
is strictly prohibited and may be unlawful.  If you have received this 
communication in error, please notify us immediately by replying to this 
message and destroy the material in its entirety, whether in electronic or hard 
copy format.  Thank you.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to