View previous topic :: View next topic |
Author |
Message |
karthikey Beginner
Joined: 16 Jun 2006 Posts: 8 Topics: 3
|
Posted: Mon Jun 19, 2006 5:20 am Post subject: DATASET allocation in REXX program using DDNAME |
|
|
Hi,
Following is my requirement.
I need to pass DDNAME from JCL to my REXX program to allocate a DATASET in REXX program.
Is anybody help me on this for How to do this ? |
|
Back to top |
|
 |
sriramla Beginner
Joined: 22 Feb 2003 Posts: 74 Topics: 1
|
Posted: Mon Jun 19, 2006 7:43 am Post subject: |
|
|
If your DD Name is coming from JCL & dataset name is hardcoded in the ReXX program, then following should work:
Code: | /*ReXX*/
arg ddname
"ALLOC FILE("ddname") DATASET('YOUR.DATASET.NAME') SHR"
say RC |
|
|
Back to top |
|
 |
karthikey Beginner
Joined: 16 Jun 2006 Posts: 8 Topics: 3
|
Posted: Mon Jun 19, 2006 8:53 am Post subject: |
|
|
Hi Sriramla,
Thanks for ur reply.
But my requirement is like, Getting the DDNAME from JCL and that will be passed to LMINIT.Before passing that, I need to convert it in to DSNNAME
Code: |
/* REXX*/
ARG DNAME
ADDRESS "ISPEXEC"
"LMINIT DATAID(LMID) DATASET('"DNAME"')"
"LMOPEN DATAID("LMID")"
DO FOREVER = 1
"LMMLIST DATAID("LMID") MEMBER(LMMEM) STATS(YES)"
SAY LMMEM
END
|
Please let me know ur valuble input. |
|
Back to top |
|
 |
karthikey Beginner
Joined: 16 Jun 2006 Posts: 8 Topics: 3
|
Posted: Mon Jun 19, 2006 9:44 am Post subject: |
|
|
Using following code,
my requirment is solved
Code: | ARG PDSNAME
CALL LISTDSI(PDSNAME FILE)
DNAME = SYSDSNAME
SAY DNAME |
Thanks |
|
Back to top |
|
 |
|
|