Extract all unwrapped inbound interchange data to IFS directory

EXTOL RPGLE - Extract all unwrapped inbound interchange data to IFS directory

     h Debug(*Yes) Datedit(*Ymd)
     H/Title Extract interchange data from EXTOL
      *====================================================
      * SYNOPSIS :
      *  Read EXTOL Logical: EXLLIQL2
      *  Run CMD: EXPNWRDTA to extract interchange data for single TP. Place data into QTEMP
      *  Run CMD: CPYTOSTMF to move data from QTEMP to IFS file: /tmp/RXXXXXXX.txt
      *
      * System        : Integrator 400
      * User name     : Sean Hoppe
      * Date generated: 03/07/13
      *====================================================
      * Maintenance   :
      *====================================================
      *==================================================================================
      *   BMR    Date    Description
      *   ---- ---------- ----------------------------------------------------------------
      *  SRH  03/07/2012 Original Compile.
      ***********************************************************************************
     fEXLLIQL2  if   e           k Disk
      *
     d Command         s            100    Dim(3) Ctdata Perrcd(1)              Commands
     d @@Cmd           s           3000
     d @@Cmd2          s           3000
 ..  d @@Cmdlength     s             15  5 Inz(3000)
     d @TPCD           s                   Like(LITPCD)
     d @INDI           s                   Like(LIINDI)
     d @ICNLN          s              7
      *
      * Parameters for 'QCMDEXC'
     c     Qcmd          Plist
     c                   Parm                    @@Cmd
     c                   Parm      3000          @@Cmdlength
      *
      * Key to EXLLIQL2 - EXTOL interchange records
     c     KeyLLIQL      Klist
     c                   Kfld                    @TPCD
     c                   Kfld                    @INDI
      *
     c                   MOVE      'XXXXX'       @TPCD
     c                   MOVE      'R'           @INDI
      *
      * Read EXTOL Interchange file with KEYS: NBREP and R
     c     KeyLLIQL      SETLL     @LLIQL2
     c                   Dow       Not *Inlr
     C     KeyLLIQL      READE     @LLIQL2                                Lr
      *
     c                   Clear                   @ICNLN
     c                   MOVE      LICNLN        @ICNLN
     C*
      * Set-up QCMD to call EXPNWRDTA
     c                   Clear                   @@Cmd
     c                   Eval      @@Cmd = Command(1)
      *
      * Move connection log to EXPNWRDTA Command
     c                   Eval      %Subst(@@Cmd:21:7) = @ICNLN
     c                   Eval      %Subst(@@Cmd:42:7) = @ICNLN
      *
      * Execute CMD:EXPNWRDTA
     c                   Call      'QCMDEXC'     QCmd
     C*
      * Set-up QCMD to call CPYTOSMTF
     c                   Clear                   @@Cmd
     c                   Eval      @@Cmd = Command(2)
     c                   Eval      %Subst(@@Cmd:68:76) = Command(3)
      *
      * Move connection log to CPYTOSTMF Command
     c                   Eval      %Subst(@@Cmd:41:7) = @ICNLN
     c                   Eval      %Subst(@@Cmd:55:7) = @ICNLN
     c                   Eval      %Subst(@@Cmd:83:7) = @ICNLN
      *
      * Execute CMD:CPYTOSTMF
     c                   Call      'QCMDEXC'     QCmd
     C*
     C     KeyLLIQL      READE     @LLIQL2                                Lr
     C                   ENDDO
     c                   Eval      *Inlr = *On
     C*
     c                   Return
** Command Override DBF Array
EXPNWRDTA CNNLOGNBR(0123456) FILE(QTEMP/R0123456) RCDLEN(1024)
CPYTOSTMF FROMMBR('/qsys.lib/qtemp.lib/R0123456.file/R0123456.mbr')
 TOSTMF('/tmp/r0123456.txt') STMFOPT(*REPLACE) STMFCODPAG(*PCASCII)



By: on