Calling runtime errors in AS/400

510 pts.
Tags:
AS/400
AS/400 Runtime Errors
RPG
RPG Code
Program A calls program B with invoice# ( 10S 0) as a parameter. Program B receives Invoice# as a incoming parameter ( Invoice# is a file field). But when program b is called i get a runtime error " PGMB 400 decimal-data error in field (C G S D F)" Help me to fix this error. Code goes as follows: PGMA ______ IDS DS I I 123456789 1 90INV C CALL 'PGMB' C PARM 3 INV 90 C SETON LR PGMB ________ FINVOICEPF IF E DISK C *ENTRY PLIST C PARM INV# C INV# DSPLY C SETON LR ___________

Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • CharlieBrowne
    You should verify the the source and the target program have the value defined the same. Either both as Signed or both as Packed Decimal
    41,370 pointsBadges:
    report
  • WoodEngineer
    You might try defining a prototype instead of the *Entry list. RPG is more flexible accepting parms via prototypes.
    6,265 pointsBadges:
    report
  • TomLiotta
    I agree in general. There shouldn't be any programs created with a *ENTRY PLIST any more. However, to explore why the error is occurring, you might make this change:
         C     *ENTRY        PLIST
         C     INV#          parm                    pINV#            10
    I can't quite tell how you are expecting to send a ( 10S 0) parm. The format that you posted the code in is nearly unreadable, but it looks more like nine positions rather than 10. If INV# really is a zoned-decimal field in the database and INV is a 10-digit zoned field in the calling program, then you should be able to reference the PARM as a 10-character field. When it gets moved to INV#, it should resolve fine. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    RPG/400?? Are you sure? your members are type RPG not RPGLE??? Then C *ENTRY PLIST C parm pINV# 90 C move PINV# INV#
    49,425 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following