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
 

 

To copy members from one PDS to another PDS using REXX

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

New User


Joined: 13 Sep 2006
Posts: 13

PostPosted: Sat Sep 23, 2006 6:56 pm    Post subject: To copy members from one PDS to another PDS using REXX
Reply with quote

Hi,

Please any one know how to copy selected members from one PDS to another PDS using REXX.

Thanks in Advance,
Logu.
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Sat Sep 23, 2006 8:14 pm    Post subject:
Reply with quote

You can do that either by using EXECIO and TSO's ALLOCATE command, or by ISPF service LMMADD.

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

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Sat Sep 23, 2006 9:33 pm    Post subject: Re: To copy members from one PDS to another PDS using REXX
Reply with quote

Or use IEBCOPY for the purpose it's designed for.
Back to top
View user's profile Send private message
rrlogu
Warnings : 1

New User


Joined: 13 Sep 2006
Posts: 13

PostPosted: Mon Sep 25, 2006 11:59 am    Post subject: Re: To copy members from one PDS to another PDS using REXX
Reply with quote

i am new to REXX, could you please help with the code?
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Mon Sep 25, 2006 8:22 pm    Post subject: Re: To copy members from one PDS to another PDS using REXX
Reply with quote

Code:

//STEP0001 EXEC PGM=ICEGENER                                         
//SYSUT1   DD   *,DLM=@@                                             
/* REXX */                                                           
"EXECIO * DISKR MEMLIST (STEM MEM. FINIS"                             
QUEUE "  COPY INDD=((PDS1,R)),OUTDD=PDS2"                             
DO N = 1 TO MEM.0                                                     
  QUEUE "  SELECT MEMBER=("STRIP(MEM.N)")"                           
END                                                                   
QUEUE ""                                                             
"EXECIO "QUEUED()" DISKW SYSIN (FINIS"                               
ADDRESS TSO "CALL *(IEBCOPY)"                                         
EXIT 0                                                               
@@                                                                   
//SYSUT2   DD   DSN=&&PDS(X),DISP=(,PASS),UNIT=VIO,SPACE=(CYL,(1,1,1))
//SYSPRINT DD   SYSOUT=*                                             
//SYSIN    DD   DUMMY                                                 
//*                                                                   
//STEP0002 EXEC PGM=IKJEFT01,PARM='%X'                             
//SYSPROC  DD   DSN=&&PDS,DISP=(OLD,DELETE)                         
//SYSTSPRT DD   SYSOUT=*                                           
//SYSTSIN  DD   DUMMY                                               
//MEMLIST  DD   *                                                   
MEM1                                                               
MEM2                                                               
MEM3                                                               
/*                                                                 
//PDS1     DD   DISP=SHR,DSN=&SYSUID..PDS1                         
//PDS2     DD   DISP=SHR,DSN=&SYSUID..PDS2                         
//SYSPRINT DD   SYSOUT=*                                           
//SYSIN    DD   UNIT=VIO,SPACE=(CYL,(1,1)),RECFM=FB,LRECL=80       
//*                                                                 
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 REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm


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