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
 

 

verify if lib exists

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

New User


Joined: 01 Apr 2009
Posts: 33
Location: Rome - Italy

PostPosted: Wed Nov 04, 2009 6:21 pm    Post subject: verify if lib exists
Reply with quote

hi all.

i have a clist that modify the members of a lib...
it's all ok but i have only a little problem:
first, my clist asks the name of lib... if it exists it's ok, but if it not exists the clist goes abend...
In this case i don't want end the clist but i want open another lib...

There is a command to verify if a lib exist first to open it?

EXCUSE ME FOR MY ENGLISH...
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: Wed Nov 04, 2009 6:35 pm    Post subject:
Reply with quote

Take a look at SYSDSN
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Wed Nov 04, 2009 6:35 pm    Post subject:
Reply with quote

Hi,

LISTDSI should be able to help you,
check the variable X. if 0 continue processing, if 16 skip to next dataset.

Code:
/*REXX*/                                                         
VAR1="XK89.DREAM.CNTL4"                                         
VAR4 = STRIP("'"VAR1"'")                                         
X = LISTDSI(VAR4)                                               
SAY 'X IS 0 IF DATASET EXISTS, 16 IF ITS NOT FOUND. X IS' X     
EXIT     


Hope this helps icon_biggrin.gif

Thanks & Regards,
Back to top
View user's profile Send private message
Seppe

New User


Joined: 01 Apr 2009
Posts: 33
Location: Rome - Italy

PostPosted: Wed Nov 04, 2009 6:38 pm    Post subject:
Reply with quote

can i use this command in clist?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Wed Nov 04, 2009 6:42 pm    Post subject:
Reply with quote

Hi,

Oops I did not notice that you mentioned CLIST in the initial post.
I am not aware if it can be used in CLIST.

I think it will work I guess,

A google of CLIST + LISTDSI gives,

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.ikjb800/a26230.htm

Regards,
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 TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts PDSFAST VERIFY - What does it really ... shetttigarvivek JCL & VSAM 1 Tue Nov 29, 2016 9:21 am
No new posts Truncated error message after VERIFY ... David Sde TSO/ISPF 4 Mon Sep 05, 2016 11:26 pm
No new posts Rexx to verify if there is any replie... Pedro CLIST & REXX 3 Thu Mar 19, 2015 1:30 pm
No new posts Verify/NoVerfiy parameter in DFSORT ksk DFSORT/ICETOOL 1 Thu Aug 07, 2014 5:19 pm


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