Copy a VSAM VSE Library Member to a Preallocated z/OS PDS Member

Use the Process to copy a VSAM VSE Library member into a preallocated z/OS partitioned data set (PDS) member.

The disk data set has already been defined to the appropriate system catalog. This Process was written with symbolics for substitution. When referencing VSAM libraries in a IBM® Connect:Direct® Process you must specify the DSORG and DISP parameters.

LIB2ZOS2 PROC  PNODE=SC.VSE.NODE                                               -
               SNODE=SC.OS390.NODE                                             -
               &MEMBER=DITTODVT                                                -
               &OS390LIB=USER01.PROCESS.LIB                                    -
               &VSELIB=CONN.DIRECT.LIB1                                        -
               &VSESUB=RXUSER01                                                -
               &VSETYP=JCL
STEP0001 COPY  FROM ( PNODE                                                    -
                    DSN=&VSELIB                                                -
                    DISP=SHR                                                   -
                    DCB=(DSORG=VSAM)                                           -
                    LIBR=(SELMEM=&MEMBER                                       -
                          SELTYPE=&VSETYP                                      -
                          SELSLIB=&VSESUB                                      -
                          REPLACE=YES)                                         -
                    )                                                          -
               TO   ( SNODE                                                    -
                    DSN=&OS390LIB                                              -
                    DISP=SHR                                                   -
                    )                                                          -
               COMPRESS EXT
STEP0002 IF    (STEP0001 EQ 0) THEN
                    RUN TASK (PGM=DMNOTIFY,                                    -
                        PARM=(’GOOD’,&OS390LIB))                               -
                        PNODE
         ELSE
                    RUN TASK (PGM=DMNOTIFY,                                    -
                        PARM=(’FAIL’,&OS390LIB))                               -
                        PNODE
         EIF