Posted: Mon Dec 22, 2008 2:39 pm Post subject: Packed Decimal - NULL Value
Apprentice
Joined: 07 Sep 2004 Posts: 39
How to handle a NULL value with Packed Decimal (COBOL Copy book).
I get below error when i try to parse a record when NULL occurs for a PD,
10 BNK1-MEET-YR PIC 999 COMP-3.
ConversionException BIP5505E: A data conversion failed because the data was invalid.
Type of data being read: 'packed decimal, no sign found '
Data: '0x0000'
If you are seeing a X'00' data then it is a NULL. Null values cannot be passed to PIC S9(X) COMP(3) fields or the Broker will not be able to parse it as a packed decimal field. They must be explicitly set to zeroes [MOVED ZEROES] and not LOW/MIN values [As they are known in Mainframe lingo].
The mainframe application will by default retro fit a sign and then send it across to your application.
Thus you should be receiving a X'C00' for the packed fields in question.
rajeevreddy: Please don't double post. This thread looks almost identical to http://www.mqseries.net/phpBB2/viewtopic.php?t=46970
harish_td: Message broker is smarter than you think. Take a look at the other thread.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum