Im new to REXX and from what i have read I can OPEN, COPY and EDIT A PDS member but to my libary. What im trying to do is have a user click pick a option in ISPF panel and have it copy a pds member to there personal pds libary this is the code i have
/*REXX*/ ADDRESS ISPEXEC "LMINIT DATAID(INDD1) DATASET('CRM.CRM1JAR.PDSTEST')" SAY INDD1 "LMINIT DATAID(OUTDD1) DATASET('CRM.CRM1JAR.PDSTEST')" SAY OUTDD1
"LMCOPY FROMID("INDD1") TODATAID("OUTDD1") FROMMEM(ASYSNEWK) TOMEM(ASYSNEW1) REPLACE PACK" SAY COPIED
"LMFREE DATAID("INDD1")" SAY FREE INDD1 "LMFREE DATAID("OUTDD1")" SAY FREE OUTDD1
no i just want to copy a member which i can do now in REXX but how can I copy the member to user's personal libary. I was reading something about ZUSER to identify the user and then maybe put it in there libary.
What happens if you point the outdd1 at some "other" pds - try hard-coding one of your own test datasets.
One thing that would make this difficult on some of the systems i've supported is that personal datasets might not start with the userid. . . Site naming conventions often dictate "standard" dataset names. System generated datasets (i.e. userid.SRCHFOR.LIST) might have userid as the first node, but not others.
You can get the userid using VUSER, but what if not all users have the same-style named pds?
when i hard code it works just fine. doenst really matter what the naming convention will be just need it created on there id. the user will not even know its in there libary and once they are done editing the data and it is saved back to original member i will delete it.
we have strick naming conventions but how about creating another copy in the original libary but have the rexx code dynamically create mutiple copies with diffrent names. like newwkld1, newwkld2, newwkld3 how would i go about doing that.
I don't believe you want multiple "shadow" copies for different users in the original library. Managing these could be quite problematic.
I'm not really clear on why duplicate members are needed only to be discarded later. The editor already works on a copy and if the changes aren't wanted, one can simply CANCEL out of editing. What purpose does another copy serve?