Dltatran.rpg

      *
      *
     FATRANS  UF  E           K        DISK         KCOMIT
      *
      *  Declare an externally-described data structure
      *  based on ACCTS file.
     IACCREC    E DSACCTS
      *
      *  Declare the input buffer.
     IBUF         DS                           9999
     I                                    B  49  520OLDOFF
     I                                    B  53  560OLDLEN
      *
      *  Declare binary variables
      *  for QMHSNDPM API.
     IBINDS       DS
     I                                    B   1   40MSGDLN
     I                                    B   5   80STKCTR
     I                                    B   9  120ERRCOD
      *
      *  Declare message file
      *  constant.
     I              'MYMSGF    *LIBL'     C         #MSGF
      *
      *
     C           *ENTRY    PLIST
     C                     PARM           BUF
     C                     PARM           BUFLEN  4
      *
      *
      *  Add 1 to offset to get position of
      *  old record image in the input buffer.
      *  Then copy it to the record data
      *  structure.
     C           OLDOFF    ADD  1         POS     70
     C           OLDLEN    SUBSTBUF:POS   ACCREC
      *
      *
      *  Delete the ATRANS records. The ACCNBR
      *  field is part of the ACCREC data
      *  structure.
     C           *IN99     DOUEQ'1'
      *
     C           ACCNBR    DELETATRANS               9901
      *
     C           *IN01     IFEQ '1'
     C                     CALL 'QMHSNDPM'
     C                     PARM 'MSG0001' MSGID   7
     C                     PARM #MSGF     MSGF   20
     C                     PARM           MSGDTA  1
     C                     PARM 0         MSGDLN
     C                     PARM '*ESCAPE' MSGTYP 10
     C                     PARM '*'       MSGQ   10
     C                     PARM 1         STKCTR
     C                     PARM           MSGKEY  4
     C                     PARM 0         ERRCOD
     C                     ENDIF
      *
     C                     ENDDO
      *
      *
      *
      *  Leave program loaded.
     C                     RETRN
      *

-ADS BY GOOGLE

SearchDataCenter

Close