Page 1 of 1

Getting the DSN from DDNAME in REXX (JCL)

PostPosted: Thu Mar 24, 2016 2:41 am
by papadilbert
I have jcl that executes a REXX script that reads an input file using EXECIO.

I need to determine in the REXX script the dataset name that the JCL associated with the DD Name.

Ideas?

Re: Getting the DSN from DDNAME in REXX (JCL)

PostPosted: Thu Mar 24, 2016 2:53 am
by Akatsukami
Use the LISTDSI function with the FILE keyword to get the data set name in variable SYSDSNAME.

Re: Getting the DSN from DDNAME in REXX (JCL)

PostPosted: Thu Mar 24, 2016 3:22 am
by papadilbert
Yep. That's what I just discovered. Works great. Thanks!

I had to switch from IRXJCL to IKJEFT01 in order to execute the LISTDSI function.