MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DATASET allocation in REXX program using DDNAME

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
karthikey
Beginner


Joined: 16 Jun 2006
Posts: 8
Topics: 3

PostPosted: Mon Jun 19, 2006 5:20 am    Post subject: DATASET allocation in REXX program using DDNAME Reply with quote

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
View user's profile Send private message
sriramla
Beginner


Joined: 22 Feb 2003
Posts: 74
Topics: 1

PostPosted: Mon Jun 19, 2006 7:43 am    Post subject: Reply with quote

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
View user's profile Send private message
karthikey
Beginner


Joined: 16 Jun 2006
Posts: 8
Topics: 3

PostPosted: Mon Jun 19, 2006 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message
karthikey
Beginner


Joined: 16 Jun 2006
Posts: 8
Topics: 3

PostPosted: Mon Jun 19, 2006 9:44 am    Post subject: Reply with quote

Using following code,

my requirment is solved

Code:
ARG PDSNAME               
CALL LISTDSI(PDSNAME FILE)
DNAME = SYSDSNAME         
SAY DNAME


Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group