Copy a BSAM VSE Sublibrary to a New VSE BSAM Library

This Process sends an entire BSAM VSE sublibrary into a new VSE BSAM library to be allocated on the SNODE. This Process uses symbolic values. You must specify all of the shown below, on the FROM side to Process BSAM libraries.

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.

LIB2LIB1 PROC  SNODE=SC.VSE.NODE                                               -
               PNODE=SC.VSE.NODE                                               -
               &NEWLIB=USER01.TEST.FBALIB01                                    -
               &VSELIB=CONN.DIRECT.LIBRARIES                                   -
               &VSESUB=USER01                                                  -
               &VSETYP=*
STEP0001 COPY  FROM ( PNODE                                                    -
                    DSN=&VSELIB                                                -
                    DISP=SHR                                                   -
                    LIBR=(*)                                                   -
                    VOL=SER=USER03                                             -
                    DCB=(DSORG=PS,RECFM=FB,LRECL=80)                           -
                    )                                                          -
               TO   ( SNODE                                                    -
                    DSN=&NEWLIB                                                -
                    UNIT=FBA                                                   -
                    DISP=NEW LIBR=(*)                                          -
                    VOL=SER=FBA001                                             -
                    DCB=(DSORG=PS,RECFM=F)                                     -
                    SPACE=(100,(4000),RLSE)                                    -
                    )
STEP0002 IF    (STEP0001 EQ 0) THEN
                    RUN TASK (PGM=DMNOTIFY,                                    -
                        PARM=(’GOOD’,&NEWLIB))                                 -
                        PNODE
         ELSE
                    RUN TASK (PGM=DMNOTIFY,                                    -
                        PARM=(’FAIL’,&NEWLIB))                                 -
                        PNODE
         EIF