View previous topic :: View next topic
|
Author |
Message |
Thomas_MF
New User
Joined: 07 Oct 2006 Posts: 2 Location: Bangalore
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Thomas_MF
New User
Joined: 07 Oct 2006 Posts: 2 Location: Bangalore
|
|
|
|
Thank You for your response. |
|
Back to top |
|
|
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 Location: Ottawa Canada
|
|
|
|
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 |
|
|
|