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
___________
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
Discuss This Question: 4  Replies