IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

GDG created and referred in same job


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ibmcoolz

New User


Joined: 20 Sep 2006
Posts: 6

PostPosted: Wed Jul 08, 2009 10:28 pm
Reply with quote

I am just trying to get a clarification on GDGs. Suppose I create a GDG
dataset in the first step of my JCL for eg.
I create a GDG dataset TEST.ABC.G0001V00 in Step 010 in my jcl.
using DSN=TEST.ABC(+1)
I wish to refer to it in the same job, in say, Step 030 , a subsequent step.
Can i refer this dataset using DSN=TEST.ABC(+0),DISP=SHR in Step 030.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jul 08, 2009 10:37 pm
Reply with quote

No, it's +1.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 08, 2009 10:55 pm
Reply with quote

The new generation won't be cataloged until the job finishes, so everywhere you need the generation in the job, you will need (+1) as Kevin says.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 08, 2009 11:34 pm
Reply with quote

Hello,

When you have a question, post a new topic for your your question rather than posting a reply to a topic that has been inactive for 4 years.

d
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Jul 09, 2009 7:42 am
Reply with quote

Hi Robert,

I disagree with
Quote:
new generation won't be cataloged until the job finishes
.

I'm able to see the GDG's cataloged when a job is still running.


Gerry
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Thu Jul 09, 2009 9:31 am
Reply with quote

For GDG it will always say as 'ROLLED IN' and not 'RETAINED' as for the normal datasets. The 'Rolledin' is 'ROLLEDOUT' at job termination and then only the version is available.

The GDG, version control is handled by Job termination routines. Even though we create a +1, it becomes a 0 level, after Job termination.So that is the reason why you keep +1 in the job, wherever the dataset is refered in the same job and in the same run.

Hope this helps.
Back to top
View user's profile Send private message
ibmcoolz

New User


Joined: 20 Sep 2006
Posts: 6

PostPosted: Thu Jul 09, 2009 10:22 am
Reply with quote

Thanks for all your responses. I agree that when we create a new GDG we must refer it with a +1 in a subsequent step in the same job.
But I was told that a particular installation allows usage of a +0 to refer GDG created in an earlier step in the job. Maybe an exception!!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 09, 2009 10:27 am
Reply with quote

Hello,

Quote:
But I was told that a particular installation allows usage of a +0 to refer GDG created in an earlier step in the job
If the job is terminated early for some reason and re-started later, the reference to the new generation (cataloged by the terminated run) would then be zero not +1 as would be coded in the normal jcl.

Possibly, this is the situation where someone mentioned the zero would be used.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Thu Jul 09, 2009 10:32 am
Reply with quote

Quote:
But I was told that a particular installation allows usage of a +0 to refer GDG created in an earlier step in the job. Maybe an exception!!

can you tell me what installation is that?

As for as I know, during aborts

1)Once the job aborts,then the job gets completely disconnected with the submitted id.In this case,after job aborts,if you need to restart the job then it is same as submitting a new job. eg., version (0) is applicable.It is same as submitting a new job.hence (0) is applicable for GDG's (only during the restart).

2)The job moves to hold once the job aborts.If you need to restart after the abort then the control lies within the job and it is entirely different from the job that follows the process of the first step. For scheduling systems,the version (+1) is applicable during restart.Scheduling systems belong to the second case where in which your job
flow STOPS during aborts.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Thu Jul 09, 2009 10:34 am
Reply with quote

I didn't noticed the posting by Dick. I agree with Dick.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to read unpacked field created in... DFSORT/ICETOOL 12
No new posts REXX identify the last/latest created... CLIST & REXX 7
No new posts Include a member getting created with... JCL & VSAM 5
No new posts Not able to PuT message in Newly crea... Java & MQSeries 1
No new posts EZACFSM1 created file name - passing ... JCL & VSAM 23
Search our Forums:

Back to Top