copy of PDS member to user PDS libary



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

copy of PDS member to user PDS libary

Postby JRIVERA » Thu Jun 04, 2009 1:20 am

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

ADDRESS ISPEXEC
"EDIT DATASET('CRM.CRM1JAR.PDSTEST(ASYSNEW1)')"
Jrivera:

Thanks for your help and suggestions.
JRIVERA
 
Posts: 16
Joined: Thu Jun 04, 2009 12:57 am
Has thanked: 0 time
Been thanked: 0 time

Re: copy of PDS member to user PDS libary using REXX

Postby dick scherrer » Thu Jun 04, 2009 1:31 am

Hello and welcome to the forum,

What happens when you run this?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: copy of PDS member to user PDS libary using REXX

Postby JRIVERA » Thu Jun 04, 2009 1:37 am

thank you

when i run this it makes a copy of a pds member, renames the member and opens it in edit mode
Jrivera:

Thanks for your help and suggestions.
JRIVERA
 
Posts: 16
Joined: Thu Jun 04, 2009 12:57 am
Has thanked: 0 time
Been thanked: 0 time

Re: copy of PDS member to user PDS libary using REXX

Postby JRIVERA » Thu Jun 04, 2009 2:02 am

want i want to do is when the user picks that option to copy the pds to there personal libary
Jrivera:

Thanks for your help and suggestions.
JRIVERA
 
Posts: 16
Joined: Thu Jun 04, 2009 12:57 am
Has thanked: 0 time
Been thanked: 0 time

Re: copy of PDS member to user PDS libary using REXX

Postby dick scherrer » Thu Jun 04, 2009 2:26 am

Hello,

want i want to do is when the user picks that option to copy the pds to there personal libary
The entire pds or just some member(s)?

If you want to copy the entire pds, suggest you dynamically create the jcl and copy in batch.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: copy of PDS member to user PDS libary using REXX

Postby JRIVERA » Thu Jun 04, 2009 2:36 am

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.

thanks for your sugestions
Jrivera:

Thanks for your help and suggestions.
JRIVERA
 
Posts: 16
Joined: Thu Jun 04, 2009 12:57 am
Has thanked: 0 time
Been thanked: 0 time

Re: copy of PDS member to user PDS libary using REXX

Postby dick scherrer » Thu Jun 04, 2009 2:50 am

Hello,

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: copy of PDS member to user PDS libary using REXX

Postby JRIVERA » Thu Jun 04, 2009 3:08 am

ok im going to read up om VUSER

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.
Jrivera:

Thanks for your help and suggestions.
JRIVERA
 
Posts: 16
Joined: Thu Jun 04, 2009 12:57 am
Has thanked: 0 time
Been thanked: 0 time

Re: copy of PDS member to user PDS libary using REXX

Postby JRIVERA » Thu Jun 04, 2009 3:14 am

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.
Jrivera:

Thanks for your help and suggestions.
JRIVERA
 
Posts: 16
Joined: Thu Jun 04, 2009 12:57 am
Has thanked: 0 time
Been thanked: 0 time

Re: copy of PDS member to user PDS libary

Postby dick scherrer » Thu Jun 04, 2009 5:45 am

Hello,

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post