View previous topic :: View next topic
|
Author |
Message |
vasan_4u
New User
Joined: 28 Jun 2005 Posts: 35 Location: chennai
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Will you be generous and share your TRACE results with us?
O. |
|
Back to top |
|
|
vasan_4u
New User
Joined: 28 Jun 2005 Posts: 35 Location: chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
... not to mention that that's NOT TRACE output. That looks like the output from a batch job stream. |
|
Back to top |
|
|
vasan_4u
New User
Joined: 28 Jun 2005 Posts: 35 Location: chennai
|
|
|
|
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 |
|
|
vasan_4u
New User
Joined: 28 Jun 2005 Posts: 35 Location: chennai
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Just remember that LISTDSI supports only absolute GDG names, not relative names.
O. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
vasan_4u
New User
Joined: 28 Jun 2005 Posts: 35 Location: chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
|