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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


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