IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To copy members from one PDS to another PDS using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Sat Sep 23, 2006 8:14 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top