Copy a File From z/OS to i5/OS

In this example, the member FILEA in PDS USER.TESTLIB on a z/OS system is copied to the member TEST in the TESTFILES/PROCLIB file on a Connect:Direct® for i5/OS node. If the member TEST already exists in the file TESTFILES/PROCLIB on the Connect:Direct for i5/OS node, it is replaced by this version.

/* COPY FROM: SOURCE DATA SET ATTRIBUTES  (z/OS) */
STEP01     COPY   FROM  (DSN=USER.TESTLIB(FILEA)             -
                        PNODE                                -
                        DISP=SHR                             -
                        )                                    -
/* COPY TO: DESTINATION DATA SET ATTRIBUTES (i5/OS) */
                  TO    (SNODE                               -
                        DSN=‘TESTFILES/PROCLIB(TEST)’        -
                        DISP=RPL                             -
                        SYSOPTS=\"\                          -
                                \TYPE(MBR)\                  -
                                \TEXT(‘COPIED FROM FILEA’)\  -
                                \"\                          -
                        )