View previous topic :: View next topic
|
Author |
Message |
Unique
New User
Joined: 10 Jul 2007 Posts: 24 Location: Blore
|
|
|
|
Hi,
I am creating a small rexx routine where i am copying selected members and appending few lines at end from one PDS to other. The list of members selected is in a 3rd dataset(seq).
I am able to read the seq file , get the members . But i dont know how to copy to the next PDS. Please suggest. (i tried reading some manual but nothing pointed as i wanted). |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
I would go for ISPF services: LMCOPY and LMMOVE.
You can also try IEBCOPY (which should be faster).
O. |
|
Back to top |
|
|
Unique
New User
Joined: 10 Jul 2007 Posts: 24 Location: Blore
|
|
|
|
Hi, This rexx code solved my req :
/*rexx */
ADDRESS TSO
Input_pds = 'xxx.JOBLIST'
"alloc da('"Input_pds"') f(infile) shr "
"execio * diskr infile (stem in. finis"
"free f(infile)"
address ispexec
'control errors return'
DSN1 = 'XXXX.DSN1'
DSN2 = 'XXXX.DSN2'
"lminit dataid(DD1) dataset('&DSN1') enq(shrw) org(po)"
"lminit dataid(DD2) dataset('&DSN2') enq(shrw) org(po)"
do i = 1 to in.0
MBR = strip(word(in.i))
"lmcopy fromid(&DD1) frommem(&MBR)",
"todataid(&DD2) tomem(&MBR) replace"
"EDIT DATAID(&DD2) MEMBER(&MBR) macro(addlst)"
"lmfree dataid(&DD1)"
"lmfree dataid(&DD2)"
ADDLST
/* Rexx */
ADDRESS ISREDIT MACRO
address isredit "COPY COMMENT AFTER .ZLAST"
ADDRESS ISREDIT "END"
Any Suggestions to improve are most welcome
Regards
do i = 1 to in.0
Do j = 2 to WORDS(in.i) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Thank you for posting your solution
d |
|
Back to top |
|
|
|