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

When a GDG of a new version willbe created


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

New User


Joined: 14 Oct 2006
Posts: 1
Location: MUMBAI

PostPosted: Sat Feb 24, 2007 8:02 pm
Reply with quote

Hey techno's,

Can anyone of you tell me how a GDG will be created??
i think u all will laugh at me by asking this but what i am asking for is when a GDG of a new version willbe created ?? means...

If FILENAME.G0000V00 is existing and i want to create a copy of this with same name, & generation but with different version... ie.,

FILENAME.G0000V01 and tell me how to represent this?

Usually we represent the present generation as FILENAME(0) and as being a new version how will we represent the GDG???

Pls help me out ............
icon_wink.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sat Feb 24, 2007 9:59 pm
Reply with quote

Start here
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: Sun Feb 25, 2007 1:53 am
Reply with quote

Hello Pavan,

As Bill suggests, look at that prior post.

I suspect that you don't really have FILENAME.G0000V00, but something with FILENAME.GnnnnV00 where nnnn is 0001 or greater.

When you read the "current" generation of a gdg, specify dsn(0) in your JCL. If you want the previous generation, specify dsn(-1) and to create the "next" generation, specify dsn(+1).

If your process calls for reading all of the cataloged generations of the gdg, specify the dsn with no qualifier (i.e. this could be used for "stacking" all of a day's sales that are to be read into the nightly accounts recievable job. Each location that has sales information "sends" their sales and a job reads and validates the custom sales data and creates a (+1) of the "common" daily-sales file. When the nightly recievables job is run, it reads the daily-sales file with no qualifier, which will process all generations with a single DD statement an no concern about whether a particular location has transmitted or not. If each location has a unique file, managing the receivables job is horrible. Special attention must be given to each location that reported no sales. One of my sites has 400+ sales and distribution locations and managing all of those files would be impossible.

Probably more than you wanted, but it is a fairly good example. . . icon_smile.gif
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Sun Feb 25, 2007 3:14 am
Reply with quote

Gr8 one Dick icon_biggrin.gif
This raised one more question in my mind. Suppose in a JCL, i've created a new generation of a GDG by specifying (+1) in a step and I need to refer to the same generation in any of the subsequent steps. How do I refer that? Do I need to specify (+1) or (0)?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sun Feb 25, 2007 3:19 am
Reply with quote

Again, I think the answer is that you can't without specifing the GnnnVnn.
Again, a search will find very knowledgable people already answering these questions.
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Sun Feb 25, 2007 3:45 am
Reply with quote

I think we can give (+1).
Please refer to www.geocities.com/*****/drona/programming/languages/jcl/jcl.chapter9.html
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sun Feb 25, 2007 4:27 am
Reply with quote

You are right, I still had my Vnn hat on..... icon_redface.gif
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: Sun Feb 25, 2007 4:50 am
Reply with quote

Hello,

If you have a many-step job and the (+1) is created early in the job you can use (+1) through-out the job. I would caution against doing this unless the job has very few steps.

Here's why. . .

Let's say the job has 20 steps. The (+1) is created in step3. The job abends in step 12. Let's also say that all of the steps from step10 thru step20 refer to the (+1) dataset. Your restart may be ugly. . .

If the new data was written to a non-gdg file, it could be written to a (+1) as a new step21 by simply coping the data. Restart/rerun is greatly simplified. If the data is too large, the (+1) could be created "immediately" and all of the remaining steps placed in another job that is dependent on the first job's successful completion or the creating job could send the "next" job thru the internal reader. If a second job was used, it would read the dataset as (0) and there would be no problem with gdg version in the restart.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sun Feb 25, 2007 5:08 pm
Reply with quote

deepak.vl wrote:
Suppose in a JCL, i've created a new generation of a GDG by specifying (+1) in a step and I need to refer to the same generation in any of the subsequent steps.


This is a FAQ is see posted a lot. I can never figure out WHY someone would to do this, at least within the same job.
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: Mon Feb 26, 2007 1:30 am
Reply with quote

Hello,

One situation that i see fairly often is when early step(s) apply "transactions" to the "master file(s)". Then, subsequent steps in the job use the "new master file(s)" for reporting or data extracts to feed other processes.

My preference is to end the "update" job and start a new job that uses dsn(0) for the input "master file(s)". As i mentioned earlier, this greatly simplifies any needed restarts. Needing a restart (say due to an x37) is bad enough - taking more time and possibly running an invalid job due to some convoluted restart is even worse. IMHO. . . icon_wink.gif
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 isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Copying GDG version(all/few) from pro... CLIST & REXX 13
No new posts XMITIP Latest Version JCL & VSAM 2
No new posts How to determine TLS/SSL version in m... TSO/ISPF 2
Search our Forums:

Back to Top