Reputation: 1243
If an RPG programs parameter is defined as PACKED(11,0)
CALL MYPGM parm(x'12345678901f')
gives a decimal data error.
Message ID MCH1202
Cause . . . . . : The sign or the digit codes of the packed or the zoned
decimal operand is in error. Valid signs are hex A-F, valid digit range is
hex 0-9.
In the program dump the parameter appears as:
PACKED(11,0) 12345678901.
VALUE IN HEX '12345678901F'X
Have googled but cannot find a simple explanation of format of a packed field.
Upvotes: 0
Views: 1854
Reputation: 21
If the problem is really the parameter you can get around this by doing the following workaround.
Add a debug breakpoint in your programs INZSR
and doing a call mypgm parm(' ')
. You can then add the correct value with an EVAL
in debug mode.
Upvotes: 1
Reputation: 4014
It would probably be better to write a wrapper program that takes the parameter as numeric or character and convert it to packed.
Upvotes: 1