Getting the DSN from DDNAME in REXX (JCL)



IBM's Command List programming language & Restructured Extended Executor

Getting the DSN from DDNAME in REXX (JCL)

Postby papadilbert » Thu Mar 24, 2016 2:41 am

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?
papadilbert
 
Posts: 8
Joined: Mon Apr 21, 2014 11:05 pm
Has thanked: 1 time
Been thanked: 0 time

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

Postby Akatsukami » Thu Mar 24, 2016 2:53 am

Use the LISTDSI function with the FILE keyword to get the data set name in variable SYSDSNAME.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day

These users thanked the author Akatsukami for the post:
papadilbert (Thu Mar 24, 2016 3:22 am)
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby papadilbert » Thu Mar 24, 2016 3:22 am

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.
papadilbert
 
Posts: 8
Joined: Mon Apr 21, 2014 11:05 pm
Has thanked: 1 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post