Copy a z/OS PDS Member to a VSE BSAM Sublibrary Member

This Process copies a z/OS PDS library member into a VSE BSAM sublibrary member. This sample Process is coded with symbolic parameters to allow you to use a generic Process to move any type of members (Dump, OBJ, Phase, Source, Processes, JCL) Use this Process when you are moving files from z/OS to VSE with the Process running on VSE.

The disk data set has already been defined to the appropriate system catalog. This Process was written with symbolics for substitution. When you reference BSAM libraries in a IBM® Connect:Direct® Process, you must specify: DSORG, DSN, UNIT, and VOL=SER= parameters.

When you copy data into a VSE BSAM library, you must add either RECFM=F or RECFM=V to your DCB parameter. This specification depends on the type of input file. If you do not include the RECFM, the Process fails with the message SVSJ122I.

ZOS2LIB1  PROC   SNODE=SC.OS390.NODE                                           -
                 PNODE=SC.VSE.NODE                                             -
                 &MEMBER=,                                                     -
                 &OS390PDS=USER01.PROCESS.LIB                                  -
                 &VSELIB=CONN.DIRECT.LIBRARIES                                 -
                 &VSESUB=USER01                                                -
                 &VSETYP=N                                                     -
                 &VSEVOL=USER03
STEP0001 COPY  FROM ( SNODE                                                    -
                    DSN=&OS390PDS                                              -
                    DISP=SHR                                                   -
                    SELECT=(&MEMBER)                                           -
                    )                                                          -
               TO   ( PNODE                                                    -
                    DSN=&VSELIB                                                -
                    DISP=SHR                                                   -
                    UNIT=DISK                                                  -
                    DCB=(DSORG=PS,RECFM=F)                                     -
                    VOL=SER=&VSEVOL                                            -
                    LIBR=(REPLACE=YES                                          -
                          SLIBDISP=SHR                                         -
                          SUBLIB=&VSESUB                                       -
                          TYPE=&VSETYP)                                        -
                    )                                                          -
STEP0002 IF    (STEP0001 EQ 0) THEN
                    RUN TASK (PGM=DMNOTIFY,                                    -
                        PARM=(’GOOD’,&VSELIB))                                 -
                        PNODE
         ELSE
                    RUN TASK (PGM=DMNOTIFY,                                    -
                        PARM=(’FAIL’,&VSELIB))                                 -
                        PNODE
         EIF