I need to pass a 9 digit Binary field (4 bytes in length) to an RPGLE program from a non-RPG program. Following shows how I coded in RPGLE.
* Parameter Fields
d pmbid ds
d mbid 9b 0
..
..
c *entry plist
c parm pmbid
..
..
When the Binary value is passed as the above parameter, the program doesn't convert it to the correct value.
I debugged the programs and found that the binary values sent by the calling program is converted to a different value by RPGLE. For your info. following are the values sent by non-RPG and received by RPGLE.
Sent Received by RPGLE
000000065 000000006
000000075 000000007
000001136 000000275
000001198 000000281
000001240 000000292
However, When I define this as either Packed or Zoned in both programs (Calling & Called) it works fine.
Please provide a solution as I must use passing field in Binary.
Thanks & Regards!
Software/Hardware used:
ASKED:
October 20, 2004 3:46 AM
UPDATED:
October 9, 2010 4:02 PM
I’m not sure, but I think that you need to define the RPG field as 4B. Binary fields can only be numeric and don’t support number of decimals, so you don’t need to specify zero decimals.
RolandT, in my experience I’ve found it neccesary to define a 4 position binary field as 9B 0