Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Selected Members from One PDS to Other

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Unique

New User


Joined: 10 Jul 2007
Posts: 24
Location: Blore

PostPosted: Mon Aug 20, 2007 4:12 pm    Post subject: Selected Members from One PDS to Other
Reply with quote

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

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Aug 20, 2007 4:51 pm    Post subject:
Reply with quote

I would go for ISPF services: LMCOPY and LMMOVE.

You can also try IEBCOPY (which should be faster).

O.
Back to top
View user's profile Send private message
Unique

New User


Joined: 10 Jul 2007
Posts: 24
Location: Blore

PostPosted: Wed Aug 22, 2007 10:51 pm    Post subject:
Reply with quote

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 22, 2007 11:50 pm    Post subject:
Reply with quote

Thank you for posting your solution icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts Reading selected volumes of a multi-v... RickBig JCL & VSAM 6 Wed Jul 13, 2016 7:26 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm
No new posts store randomly selected row vinod.fugal CICS 1 Thu Jul 16, 2015 11:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us