IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find existance of dataset using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Tue Apr 24, 2007 12:34 am
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
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: 148
Location: Ottawa Canada

PostPosted: Sat Apr 28, 2007 1:32 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top