View previous topic :: View next topic
|
Author |
Message |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
Hi.
I want to know whether the GDG base is already existing or not. Here i dont want to create if it is not present.
I tried the following with the existing GDG base. But it is throwing return code of 16.
Code: |
/* REXX */
X = LISTDSI("'DUR3.VBGA.ACTY.DBKEY.FILE'")
SAY 'FUNCTION CODE FROM LISTDSI IS: ' X
|
Before that i tried using IDCAMS. But it creates the base if it is not present.
Code: |
/* REXX */
X = OUTTRAP(N.)
"DEFINE GDG (NAME('DUR3.VBGA.ACTY.DBKEY.FILE1') LIM(3) SCR)"
X = OUTTRAP(OFF)
DO I = 1 TO N.0
ERR = POS("DUPLICATE DATA SET NAME",N.I)
IF ERR <> 0 THEN SAY N.I
END
EXIT 0
|
Any body please share your thoughts...
Thanks
R KARTHIK |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
LISTCAT |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
Hi,
Thanx expat.
I tried the following and it is working.
Code: |
/* REXX */
"LISTCAT ENT('"DUR3.VBGA.ACTY.DBKEY.FILE"') GDG ALL"
|
Thanks
R KARTHIK |
|
Back to top |
|
|
|