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 existance of dataset using REXX

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

New User


Joined: 07 Oct 2006
Posts: 2
Location: Bangalore

PostPosted: Mon Apr 23, 2007 8:13 pm    Post subject: How to find existance of dataset using REXX
Reply with quote

HI,
I have a flat (PS) file having 'n' number of records.each record is a dataset name. instead of checking the dataset existance for each record in the file using option 3.4, i need to know how we can do in REXX with a single job?
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Tue Apr 24, 2007 12:34 am    Post subject: Re: How to find existance of dataset using REXX
Reply with quote

Read the list of datasets. For each dataset name, use the SYSDSN function to determine the status. For each dataset name that doesn't return an "OK", then take whatever action you wish.
Back to top
View user's profile Send private message
Thomas_MF

New User


Joined: 07 Oct 2006
Posts: 2
Location: Bangalore

PostPosted: Tue Apr 24, 2007 11:40 am    Post subject: Re: How to find existance of dataset using REXX
Reply with quote

Thank You for your response.
Back to top
View user's profile Send private message
TG Murphy

Active User


Joined: 23 Mar 2007
Posts: 149
Location: Ottawa Canada

PostPosted: Sat Apr 28, 2007 1:32 am    Post subject:
Reply with quote

Here is another way way in case you're interested:


dataset_exists:
/*-----------------------------------
arg dataset
x = LISTDSI(dataset 'RECALL')
if x = 0 then
return 1
else
return 0
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


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