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 to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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