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

Create a new Version of a GDG


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

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Mon Jun 14, 2010 1:26 pm
Reply with quote

Hi, i created one GDG MYID.PROD and then created its first generation as MYID.PROD.G0001V00.

Now i tried running the IDCAMS again and tried to create a different version of this GDG...

here is the IDCAMS:
//SYSIN DD *
DEFINE GDG(NAME(MYID.PROD.G0000V01)-
LIMIT(5) -
NOEMPTY -
SCRATCH)

but i got return code 12...saying

IDC3014I CATALOG ERROR
IDC3009I ** VSAM CATALOG RETURN CODE IS 144 - REASON CODE IS IGG0CLAT-8

Could anyone tell me how to create a different verion of this GDG
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 1:29 pm
Reply with quote

Why would You want to do that ?!
Back to top
View user's profile Send private message
karz

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Mon Jun 14, 2010 1:32 pm
Reply with quote

I just tried the above thing to clear the concept of Generation and Version...Could anyone tell me how can i solve the error?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 14, 2010 1:34 pm
Reply with quote

well start by looking at the messages and code manual
and come back if there is something that is not clear
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Mon Jun 14, 2010 3:32 pm
Reply with quote

You use IDCAMS to define the generation base. After that, you may (but do not have to) use IDCAMS to delete generations or you use IDCAMS to change the number of generations retained -- but otherwise you will not use IDCAMS in reference to a GDG. Since you are not deleting generations and you are not changing the number of generations retained, your use of IDCAMS is not right.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jun 14, 2010 5:38 pm
Reply with quote

May be just for your tests, you can try to allocate other version using ISPF 3.2 and then check what happens...
Back to top
View user's profile Send private message
karz

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Mon Jun 14, 2010 6:03 pm
Reply with quote

Anuj, by 3.2 we get normal PS file..not a GDG file... Tried using Fileaid to allocate GDG..but it too gave return code 12...
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Jun 14, 2010 6:14 pm
Reply with quote

karz let's try this from the beginning.

You have a GDG base, MYID.PROD, and you've created a new generation, MYID.PROD.G0001V00. Now you want to create a new version. Presumably, the content of this new version would be different than the existing generation.

Did you try a simple, straight copy?

//STEP0001 EXEC PGM=IEBGENER
//SYSUT1 DD *
data for the new version
...
/*
//SYSUT2 DD DSN=MYID.PROD.G0001V01,DISP=(,CATLG,DELETE),UNIT=SYSDA,....
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jun 14, 2010 6:18 pm
Reply with quote

Well, please read the response from us in sequential manner - have you read what Robert has suggested already?

1. Once you've created your first generation - locate your base-entry using ISPF 3.4;

2. use ISPF 3.2 to allocate other version

3. repeat step 1.

and you'll observe something...
Back to top
View user's profile Send private message
karz

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Mon Jun 14, 2010 6:34 pm
Reply with quote

Anuj, got it...thanks all for your help...So as a summary i would put it like this

1st version and the 3 generations:

Myid.prod ??????
Myid.prod.G0001V00 STGU4B
Myid.prod.G0002V00 STGU09
Myid.prod.G0003V00 STGUF4


used 3.2 to crete a new version and 2 generations:

Now when viewed thru 3.4 it looked as:

Myid.prod ??????
Myid.prod.G0001V01 STGU4B
Myid.prod.G0002V01 STGU09
Myid.prod.G0003V00 STGUF4


So the first 2 generations of the 0'th version got replaced by the new generations of the 1st version...
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Mon Jun 14, 2010 7:06 pm
Reply with quote

Karz,

If you are new to GDG processing and are trying to understand the concept of generations and versions, here is my advice:

Understand that each new generation is another occurance of a dataset.
A generation can be referred to literally G0001V00 or relatively (0), (+1), or (-1), etc.

Understand that a version is this complicated, difficult to understand, difficult to use, totally unneeded concept, you would be better off not waisting your time with.

Always use V00, do not try to create or use V01, and you would be better off.

Do you need to know why touching a hot stove burns your hand, or is just enough to know it will burn you good enough?

This is purely my advice only, and not the opinion of this forum or anyone else on it.

I have worked with GDG files for more than 20 years and not once I have needed to use a V01. I have not touched a hot stove in that time either.
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 Jun 14, 2010 8:19 pm
Reply with quote

Hello,

Quote:
Always use V00, do not try to create or use V01, and you would be better off.

Do you need to know why touching a hot stove burns your hand, or is just enough to know it will burn you good enough?

This is purely my advice only, and not the opinion of this forum or anyone else on it.
Me too. . . icon_smile.gif

I've been working on "mainframes" since before there was a Generation Data Group. . . And have never needed different versions for an application system. . .

Suggest the time be spent on something that will be of use later. . .
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Mon Jun 14, 2010 10:54 pm
Reply with quote

We should point out that a new version of an exsting generation replaces that generation, but holds the same sequential place, and will be deleted in its turn according to the LIMIT.

A special reason to do this would be normally for a correction.

Amyone else with other valid uses, please proffer them.
Back to top
View user's profile Send private message
karz

New User


Joined: 04 Feb 2010
Posts: 39
Location: Mumbai

PostPosted: Tue Jun 15, 2010 11:13 am
Reply with quote

@daveporcelan and @dick scherrer...you too are correct..i too have not seen the use of new Version, but it bugs me that people do ask such question during an interview...

So i thought why not work on this rather than reading and understanding theoratically and see how it works practically...all my doubts are solved...


----------------------------------------------------------

Its not always late to learn in life.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Jun 15, 2010 7:26 pm
Reply with quote

My guess is that the interviewer is confused.

They mention version but really mean generation.

I would assume they really mean generation, and answer as such.

I would bet they would not know the difference.
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 create a list of SAR jobs with... CA Products 3
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts create rexx edit Macro that edits the... CLIST & REXX 3
No new posts COBOL - create and write to output fi... COBOL Programming 0
Search our Forums:

Back to Top