View previous topic :: View next topic
|
Author |
Message |
rrlogu Warnings : 1 New User
Joined: 13 Sep 2006 Posts: 13
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can do that either by using EXECIO and TSO's ALLOCATE command, or by ISPF service LMMADD.
O. |
|
Back to top |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
Or use IEBCOPY for the purpose it's designed for. |
|
Back to top |
|
|
rrlogu Warnings : 1 New User
Joined: 13 Sep 2006 Posts: 13
|
|
|
|
i am new to REXX, could you please help with the code? |
|
Back to top |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
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 |
|
|
|