Use of Conditional Logic (HP NonStop to z/OS)

In this multi-step Process, STEP01 will execute FUP to purge files FILE1, FILE2, FILE3, and FILE4 from $B.FILERESO on the PNODE. A message will be sent to the spooler ($S.#FUPTEST) that indicates whether FUP executed successfully.

STEP02 will copy DATA1.FILEA from the z/OS node (SNODE) to $B.FILERESO.FILE1 at the PNODE. The file will default to the same type of file being copied.

Conditional logic in STEP03 is then used to check the completion code of STEP02. If the completion code is greater than 4, then STEP04 will execute. If the completion code from STEP02 is 4 or less, then DATA1.FILEB will be copied from the z/OS node to $B.FILERESO.FILE2 at the HP NonStop node.

STEP04 will then execute and copy DATA1.FILEC from the z/OS node to $B.FILERESO.FILE3 at the HP NonStop node. If the completion code is greater than 8, then no further processing will occur. If the completion code of STEP03 is greater than 4, DATA1.FILED will be copied from the z/OS node to $B.FILERESO.FILE4 at the HP NonStop node.

COND1   PROCESS    PNODE=CD.HP NONSTOP                             -
                   SNODE=CD.OS390.NODE
STEP01  RUN TASK  (PGM=FUP                                         -
                   PARM=(’/OUT $S.#FUPTEST/’,                      -
                         ’VOLUME $B.FILERESO’,                     -
                         ’PURGE FILE1!  ’,                         -
                         ’PURGE FILE2!  ’,                         -
                         ’PURGE FILE3!  ’,                         -
                         ’PURGE FILE4!  ’))
STEP02  COPY  FROM  (DSN=DATA1.FILEA  DISP=SHR  SNODE)             -
              TO    (DSN=$B.FILERESO.FILE1 DISP=NEW  PNODE)
STEP03  IF   (STEP02 GT 4) THEN
              GOTO STEP04
        ELSE
              COPY  FROM  (DSN=DATA1.FILEB  SNODE)                 -
                    TO    (DSN=$B.FILERESO.FILE2  DISP=NEW PNODE)
        EIF
STEP04  COPY  FROM  (DSN=DATA.FILEC  SNODE)                        -
              TO    (DSN=$B.FILERESO.FILE3  DISP=NEW  PNODE)
        IF   (STEP03 GT 8) THEN
        EXIT
        EIF
        IF   (STEP03 LT 4) THEN
              COPY  FROM  (DSN=DATA1.FILED SNODE)                  -
                    TO    (DSN=$B.FILERESO.FILE4 DISP=NEW PNODE)
        EIF