Copy a File from HP NonStop to VM

This example copies a file from HP NonStop to VM. It uses conditional statements to check the completion code from STEP01. If the completion code equals 0, then a message is issued to the operator that indicates that the transfer was successful. If the completion code is any value other than 0, then a message is issued to the operator that indicates that the transfer failed.

PROC01     PROCESS     SNODE=CD.VM
                       PNODE=CD.HP NONSTOP
STEP01     COPY  FROM  (FILE=$B.ABC.FILEA PNODE
                       SYSOPTS=’SET XLATE ON’)
                 TO    DSN=JKL.FILEA
                       DISP=(RPL), LINK=(CDVM,MULT,MW,551))
STEP02     IF          (STEP01 EQ 0) THEN
NOTIFY1    RUN TASK    (PGM=DMNOTFY2
                       SYSOPTS=("GOOD,’TRANS FOR COMPANY A COMPLETED DISK 502’,
                       OPERATOR"))
                       SNODE
           EXIT
           ELSE
NOTIFY2    RUN TASK    (PGM=DMNOTFY2
                       SYSOPTS=("FAIL,’TRANS FOR COMPANY A FAILED DISK 502’,
                       OPERATOR"))
                       SNODE
           EIF
           EXIT