Here is a little something that I put together because I can never remember how to do this
https://gist.github.com/lbdyck/3683aff0ae765fc552b07bfa653e9fce Or if you can't see it here is the code /* --------------------- REXX ---------------------- * | This is a sample routine using REXX to deternmine | | if a file exists within OMVS. | * ------------------------------------------------- */ file = '~/.profile' rc = exist(file) if rc > 0 then say 'File exists' else say 'File does not exist' file = 'bad.file' rc = exist(file) if rc > 0 then say file 'File exists' else say file 'File does not exist' exit 0 Exist: Procedure parse arg file x = syscalls('ON') /* setup syscall environment */ if left(file,1) = '~' /* test for ~ - home alias */ then do address syscall , /* get the home directory in case */ 'getpwnam' sysvar('sysuid') 'pw.' home = pw.pw_dir /* save it in home variable */ file = home''substr(file,2) /* replace with home */ end else file = file /* or not */ address syscall , 'stat (file) st.' /* test if file exists */ x = syscalls('OFF') /* Turn off syscalls environment */ return st.0 /* return stat records: where stem count of 0 means it does not exist */ On Mon, Nov 11, 2024 at 6:08 PM Lizette Koehler <[email protected]> wrote: > I have the need to validate 100’s of home directories on TSO/RACF. IDs > > I am using IRRXUTIL to get the home directory using REXX. What can I use > to see if the path on the home directory exists? > > Example > > Tsoid MYTSO has a home directory of /tsousr/MYTSO > > What do I use to see that the path. /tsousr/MYTSO exists? > > I would like to keep this in the one REXX process > > And I would like to know what z/OS dataset it is in > > Thank you > > Lizette > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- Lionel B. Dyck <>< Website:https://github.com/lbdyck "Worry more about your character than your reputation. Character is what you are, reputation merely what others think you are." - John Wooden ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
