Copy a MSAM Data Set to a Controlled BSAM Data Set (VSE)

Use this Process to copy a MSAM (VSAM Managed SAM) data set into a CA-DYNAM/D or CA-EPIC controlled BSAM data set.

MSM2DYD1 PROC PNODE=SC.VSE.NODE                                                -
              SNODE=SC.VSE.NODE                                                -
              &VSEDSN=USER01.TEST.GDGCOPY1
STEP0001 COPY  FROM ( PNODE                                                    -
                    DSN=USER01.TEST.MSAMFIL1                                   -
                    DISP=OLD                                                   -
                    UNIT=DISK                                                  -
                    VOL=SER=USER06                                             -
                    VSAMCAT=(VSE.COMMON.CATALOG,X,X,,123)                      -
                    DCB=(DSORG=MSAM,RECFM=FB,LRECL=80,BLKSIZE=16000)           -
                    )                                                          -
               TO   ( SNODE                                                    -
                    DSN=&VSEDSN                                                -
                    DISP=NEW                                                   -
                    UNIT=DLBLONLY                                              -
                    DCB=(DSORG=PS,RECFM=F,LRECL=80,BLKSIZE=16000)              -
                    )                                                          -
                    COMPRESS
STEP0002 IF    (STEP0001 EQ 0) THEN
                    RUN TASK (PGM=DMNOTIFY,                                    -
                        PARM=(’GOOD’,&VSEDSN))                                 -
                        PNODE
         ELSE
                    RUN TASK (PGM=DMNOTIFY,                                    -
                        PARM=(’FAIL’,&VSEDSN))                                 -
                        PNODE
         EIF

In the previous example, the disk data set has already been defined to the appropriate system catalog. This Process runs on the same IBM® Connect:Direct® node using PNODE=SNODE processing. This Process uses symbolic values.

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.