Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to find the existence of GDG base without creating it...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Sep 29, 2009 1:06 pm    Post subject: How to find the existence of GDG base without creating it...
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Sep 29, 2009 1:47 pm    Post subject:
Reply with quote

LISTCAT
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Sep 29, 2009 2:50 pm    Post subject: Reply to: How to find the existence of GDG base without crea
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us