IEBCOPY renaming member while copying
EXAMPLE:
Renaming a Member While Copying
Explanation:
EXEC Statement: Executes the IEBCOPY utility program to copy and rename members in a Partitioned Dataset (PDS).
DD Statement:
SYSUT1 DD: Specifies the source PDS (T12345.SOURCE.PDS) that contains the original member (OLDNAME).
SYSUT2 DD: Specifies the target PDS (T12345.TARGET.PDS) where the renamed member (NEWNAME) will be stored.
SYSPRINT DD: Outputs logs and messages generated by IEBCOPY to the system output.
SYSIN DD: Contains the control statements for the copy operation:
COPY OUTDD=SYSUT2, INDD=SYSUT1: Tells IEBCOPY to copy data from SYSUT1 to SYSUT2.
SELECT MEMBER=((OLDNAME, NEWNAME)): Instructs IEBCOPY to copy the member (OLDNAME) from the source PDS and rename it as (NEWNAME) in the target PDS.
This JCL copies a member named OLDNAME from the source PDS (T12345.SOURCE.PDS) and saves it into the target PDS (T12345.TARGET.PDS) with a new name NEWNAME
Last updated
Was this helpful?