Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us