|
|
| 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 |
|
 |
References
|
Posted: Mon Apr 23, 2007 8:13 pm Post subject: Re: How to find existance of dataset using REXX |
 |
|
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3008 Location: Charlotte,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: 152 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 |
|
 |
|
|