Need Help With QMHRCVM - Receive Nonprogram Message API. I am having problems with the parameters (4 BYTES) Can someone help?
D ERRORDSÂ Â Â Â Â Â Â Â DSÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â INZÂ Â Â Â Â DÂ BYTESPROVÂ Â Â Â Â Â Â Â Â Â Â Â Â 1Â Â Â Â Â 4B 0 INZ(116) DÂ BYTESAVALÂ Â Â Â Â Â Â Â Â Â Â Â Â Â 5Â Â Â Â Â 8B 0Â Â Â Â Â Â Â Â Â DÂ MESSAGEIDÂ Â Â Â Â Â Â Â Â Â Â Â Â 9Â Â Â Â 10Â Â Â Â Â Â Â Â Â Â Â Â DÂ ERR###Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 16Â Â Â Â 16Â Â Â Â Â Â Â Â Â Â Â Â DÂ MESSAGEDTAÂ Â Â Â Â Â Â Â Â Â Â 17Â Â Â 116Â Â Â Â Â Â Â Â Â Â Â Â
Software/Hardware used:
ASKED:
May 6, 2010 3:29 PM
UPDATED:
May 8, 2010 12:07 AM
I changed the length of one parameter:
D MESSAGEID 9 15
Now I recieve message
EVAL ERRORDS
BYTESPROV OF ERRORDS = 000000116.
BYTESAVAL OF ERRORDS = 000000015.
MESSAGEID OF ERRORDS = ‘CPF24B4′
ERR### OF ERRORDS = ’0′
MESSAGEDTA OF ERRORDS =
Get rid of all of your {4B 0} field definitions and replace them with correct definitions. Use (10I 0}.
Then see if anything changes.
A {4B 0} field is not a Binary(4). It is a kind of binary field that allows a maximum of {4} digits and provides a way for RPG to handle decimal fractions in binary fields. The maximum value that can be stored in {4B 0} is 9999 because that’s the largest 4-digit value.
The “4″ refers to number of digits in a RPG ‘B’ field.
The RPG storage representation of {4B 0} is essentially a 16-bit integer field — two bytes. The API requires 32-bit integer fields — four bytes.
Tom