RPGLE
- Example chaining to logical file to write/update data
|
C*===============================================
C*
Chaining to a logical file, if record found
C* then update quantities else write
record.
C*===============================================
C TheKey02 Klist
C Kfld PGPGRP
C Kfld PGPCA1
C Kfld PGPCA2
C Kfld PGPRDCS2
C*
C*
Chain to file with keylist if found add to existing values
C*
else Z-ADD (Zero out and add)
C*
C TheKey02 Chain AVAILABLEW
C*
C*
This snippet of code is getting total quantity on hand/pick
C*
C If %Found(AVAILABLEW)
C Eval ONHAND = ONHAND + LPLOQT
C Eval ONPICK = ONPICK + LPPIQT
C +
MOMQTY
C Update AVAILR
C Else
C
Movel(p) PGPRDCS2 PRODUCT
C
Movel(p) PGPGRP PGROUP
C Movel(p) PGPCA1 CAT1
C
Movel(p) PGPCA2 CAT2
C
Movel(p) PGDESC DESC
C Z-add LPLOQT ONHAND
C Z-add LPPIQT ONPICK
C Write AVAILR
C Endif
C*===============================================
|
Subscribe to:
Post Comments
(
Atom
)
No comments