|
What I thought would be an easy program has not turned out that way.
What I need to do is pass two parameters (&ordno chara 7 & &dte dec 70) to
program MOHTST. When I do the call (call pgm(wjmlib/mohtstcl) 'M188330'
01050401). I get an error about a data decimal data error and it is on the call
statement. When I display the two fields the ordno fields has the correct data
in it. The dte field has 000010504. It should have 1050401.
If I change the DTE to a character, the program runs fine.
Below is a copy of the CL and RPG the key for file mohmst.
I would appreciate any/and help on this.
William Moore
CL
MOHTSTCL: PGM PARM(&ORDNO &DTE)
DCL VAR(&ORDNO) TYPE(*CHAR) LEN(7) /* */
DCL VAR(&DTE) TYPE(*DEC) LEN(7 0) /* */
OVRDBF FILE(MOHMST) TOFILE(AMFLIBP/MOHMST)
OVRPRTF FILE(MOHMSTRP) TOFILE(MASTER/REPORT)
CALL PGM(WJMWORK/MOHTST) PARM(&ORDNO &DTE)
END:
DLTOVR FILE(*ALL) /* Remove all overrides */
RCLRSC /* Reclaim resources */
ENDPGM
RPG Program
FMOHMST IF E K DISK
C*
C KEY01 KLIST
C KFLD ORDNO 7
C KFLD DTE 70
C*
C*---------------------------------------------------------------*
C *ENTRY PLIST
C PARM @ORDNO 7
C PARM @DTE 70
C*---------------------------------------------------------------*
C MOVE @ORDNO ORDNO
C MOVE @DTE DTE
C*---------------------------------------------------------------*
C KEY01 CHAINMOHMST 07
C N07 EXCPTDETAIL
C SETON LR
C*---------------------------------------------------------------*
Record Key:
Alt
Key field Type Len Dec Seq Col Text
ORDNO A 7 A N Order number
DTE P 4 0 A N Closeout date
Key fields - 2
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.