Robert,
No other job can reference a relative generation while the create job is
running. The create job holds an exclusive ENQ on the GDG base as well as
GDG(0) preventing any other job from running.
This does not prevent another address space from referencing the generations
by absolute name.
Dan
-----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 [email protected] with the message: INFO IBM-MAIN