Joined: 26 Apr 2004 Posts: 3314 Location: Charlotte,NC USA
There is no purely REXX function that does what you want. However, there are some things you can do:
1. If you run your REXX exec outside of a TSO/E address space, you can call the IDCAMS utility with the LISTCAT function, and then query the resulting return-code value.
2. If you run your REXX exec within a TSO/E Address space, you can do one of the following:
A. Use the TSO command LISTDS.
B. Use the TSO command LISTCAT.
C. Use the TSO/E REXX functions SYSDSN or LISTDSI.
you can check existense of a dataset using sysdsn command
x=sysdsn("'"ps or pds name"'")
if x is equal to ok then the ps or pds exists
if x is dataset not found then the dataset does not exist
I have a requirement. I have to check for the existence of some files in the unix side from mainframe (normally i write files from mainframe to unix). If it is present , i have to delete it. Is that possible by using REXX ?
FYI -- the files will reside in a unix directory as like apps/abcd/aaaXX.txt,
apps/abcd/bbbXX.txt., etc
If possible can you help me with some sample codes ?