Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
When a GDG of a new version willbe created

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: When a GDG of a new version willbe created
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: 3158
Location: Tucson AZ

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

Start here
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Sun Feb 25, 2007 1:53 am    Post subject:
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    Post subject: When a GDG of a new version willbe created
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: 3158
Location: Tucson AZ

PostPosted: Sun Feb 25, 2007 3:19 am    Post subject:
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    Post subject: When a GDG of a new version willbe created
Reply with quote

I think we can give (+1).
Please refer to http://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: 3158
Location: Tucson AZ

PostPosted: Sun Feb 25, 2007 4:27 am    Post subject:
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

Site Director


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

PostPosted: Sun Feb 25, 2007 4:50 am    Post subject:
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

Moderator Team Head


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

PostPosted: Sun Feb 25, 2007 5:08 pm    Post subject: Re: When a GDG of a new version willbe created
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

Site Director


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

PostPosted: Mon Feb 26, 2007 1:30 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Spool Extract for Z /os 1.04 version Khadhar Basha CLIST & REXX 3 Thu Sep 28, 2017 3:14 pm
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 15 Tue Nov 01, 2016 11:24 am
No new posts Is there a time Version of DATEDIFF ? Bill Woodger DFSORT/ICETOOL 1 Wed Aug 17, 2016 7:06 pm
No new posts Syncsort version supporting FINDREP c... juares castro SYNCSORT 9 Tue Aug 09, 2016 6:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us