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

GDG generation creation not working.


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasan_4u

New User


Joined: 28 Jun 2005
Posts: 35
Location: chennai

PostPosted: Thu Dec 20, 2007 9:29 pm
Reply with quote

This is the code I have and it say for the ALLOC as the dataset for the base and the new both are giving me as not cataloged or it cannot be accessed. Can someone help me out in this.

Code:
CNEWDSN = 'GDG base name to be created'
ADDRESS TSO "DEFINE GDG (NAME('"CNEWDSN"') LIM(10) SCR)"
ADDRESS TSO "ALLOC F(GDGBAS) DS ('"CNEWDSN"') SHR REUS"
CNEWDSN = CNEWDSN || '.' || G0001V00                   
ADDRESS TSO "ALLOC F(GDGVER) DS ('"CNEWDSN"') SHR REUS"
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Dec 20, 2007 9:35 pm
Reply with quote

Will you be generous and share your TRACE results with us?

O.
Back to top
View user's profile Send private message
vasan_4u

New User


Joined: 28 Jun 2005
Posts: 35
Location: chennai

PostPosted: Thu Dec 20, 2007 9:38 pm
Reply with quote

This is the result its showing me.

Code:
IKJ56228I DATA SET LST.F.STAT.AGE.LETRS.DAY NOT IN CATALOG OR CATALOG CAN NOT B
E ACCESSED                                                                     
 IKJ56701I MISSING DATA SET NAME+                                               
 IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED                             
 IKJ56228I DATA SET LST.F.STAT.AGE.LETRS.DAY.G0001V00 NOT IN CATALOG OR CATALOG
CAN NOT BE ACCESSED                                                             
 IKJ56701I MISSING DATA SET NAME+                                               
 IKJ56701I MISSING NAME OF DATA SET TO BE ALLOCATED                             
 GDG CREATED                                                                   
 LST.F.STAT.AGE.LETRS.DAY.G0001V00                                             
 LST.F.STAT.AGE.LETRS.DAY.G0001V00 NOT LISTED                                   
 LST.F.STAT.AGE.LETRS.DAY.G0001V00 NOT LISTED
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 20, 2007 9:42 pm
Reply with quote

Code:
CNEWDSN = 'GDG base name to be created'
ADDRESS TSO "DEFINE GDG (NAME('"CNEWDSN"') LIM(10) SCR)"
ADDRESS TSO "ALLOC F(GDGBAS) DS ('"CNEWDSN"') SHR REUS"
CNEWDSN = CNEWDSN || '.' || G0001V00                   
ADDRESS TSO "ALLOC F(GDGVER) DS ('"CNEWDSN"') SHR REUS"


Let's take a look here

I'm OK with you defining the GDG base, that's the DEFINE GDG bit

So why are you trying to allocate the GDG base as a file ?

How can you possibly expect to allocate G0001V00 as SHR when it has not been created ?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Dec 20, 2007 9:43 pm
Reply with quote

... not to mention that that's NOT TRACE output. That looks like the output from a batch job stream.
Back to top
View user's profile Send private message
vasan_4u

New User


Joined: 28 Jun 2005
Posts: 35
Location: chennai

PostPosted: Thu Dec 20, 2007 9:46 pm
Reply with quote

Ok here come my question: Now as I have defined a GDG i need to create the next empty generation of the same how can i do that.

And one more thing here is i wanted to check if the base for the GDG is already present if it is then these steps have be skipped how can i acheive that
Code:
IF SYSDSN ("'"CNEWDSN"'") /='OK'
Then this check is not working for GDG.
Back to top
View user's profile Send private message
vasan_4u

New User


Joined: 28 Jun 2005
Posts: 35
Location: chennai

PostPosted: Thu Dec 20, 2007 9:49 pm
Reply with quote

Yes that not a Trace output I have a very lengthy Rexx code and to come to the step where this is present will take hour for me.

The above exception are when I directly excuted the Rexx.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Dec 20, 2007 10:04 pm
Reply with quote

Just remember that LISTDSI supports only absolute GDG names, not relative names.

O.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 20, 2007 10:12 pm
Reply with quote

Quote:
Ok here come my question: Now as I have defined a GDG i need to create the next empty generation of the same how can i do that.


That's an easy one to answer - look back at the previous thread that you started on the topic of creating GDG's, link below, follow the link that superk gave you, then read the whole thread thoroughly and use the code of mine that is posted in that thread. Had you have read the previous replies properly you would not need to ask the same question again.

http://www.ibmmainframes.com/viewtopic.php?t=26930

Quote:
And one more thing here is i wanted to check if the base for the GDG is already present if it is then these steps have be skipped how can i acheive that


What utility would you use to list out the contents of a gdg base ?
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Thu Dec 20, 2007 10:17 pm
Reply with quote

Remove this:
Code:
ADDRESS TSO "ALLOC F(GDGBAS) DS ('"CNEWDSN"') SHR REUS"

This needs to be changed:
Code:
CNEWDSN = CNEWDSN || '.' || G0001V00                   
ADDRESS TSO "ALLOC F(GDGVER) DS ('"CNEWDSN"') SHR REUS"

Do not use SHR use New, add tracks or Cyl, space, lrecl, ...
Mine looks like the following
Code:
ADDRESS "TSO" " ALLOCATE DDNAME(OUTFILE) NEW ",       
   || " DSNAME('" || DSN1 || ".G000" || C || "V00')" ,
   || " TRACKS" ,                                     
   || " SPACE(" || QTY || " " || QTY2 || ")" ,         
   || " LRECL(" || RECL || ")" ,                       
   || " BLOCK(" || BLKS || ")" ,                       
   || " RECFM(F B)"                                    "


I hope this helps you.
Back to top
View user's profile Send private message
vasan_4u

New User


Joined: 28 Jun 2005
Posts: 35
Location: chennai

PostPosted: Thu Dec 20, 2007 10:28 pm
Reply with quote

Thanks i dint follow the link which Superk gave me in the last question.

regarding this

Quote:
And one more thing here is i wanted to check if the base for the GDG is already present if it is then these steps have be skipped how can i acheive that


I used LISTDS .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 20, 2007 10:35 pm
Reply with quote

Try IDCAMS - it works great for listing GDG bases and entries if they exist and issues a non zero RC if the GDG base does not exist.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Report generation JCL & VSAM 18
Search our Forums:

Back to Top