|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MTI. Not all the buffer was used when reading message |
« View previous topic :: View next topic » |
Author |
Message
|
Gralgrathor |
Posted: Fri Sep 24, 2010 5:32 am Post subject: MTI. Not all the buffer was used when reading message |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
Hi,
I am using an embedded message structure to receive data from a
mainframe application. The header is defined by a copybook, and
identifies the following messageset and type. There is currently only one
messagetype in use, which is also described by a copybook.
This messagetype contains "OCCURS... DEPENDING ON...", meaning that
the length of the data is variable and cannot be known up front.
Which is a problem, because the mainframe application sends its
messages using a fixed length buffer, initialised to the same character
that represents a null-value in the message.
Entirely predictable, this leads to messages like
Code: |
BIP5288E: An MRM parsing error has occurred. The bit stream of the message being parsed by the MRM parser is larger than expected for a message of this type. |
What annoys me is that there is a fully parsed model of the message in
the Root at the time the exception occurs, but that there's no way of
accessing this data without triggering another exception...
Does anybody know of a way to circumvent this problem without
changing the mainframe application sending the messages?
Thanks! |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 24, 2010 5:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Either open a 4 year old post or open a new one. Don't do both.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Sep 24, 2010 6:13 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should be able to set a trailing, optional field that either repeats or has a length to the end of the message and matches the null padding.
There are specific conditions in CWF for the last field to have unknown repeats or to have length to the end of the bitstream, at least in 6.1 and later. |
|
Back to top |
|
 |
Gralgrathor |
Posted: Fri Sep 24, 2010 7:05 am Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
mqjeff wrote: |
You should be able to set a trailing, optional field that either repeats or has a length to the end of the message and matches the null padding.
There are specific conditions in CWF for the last field to have unknown repeats or to have length to the end of the bitstream, at least in 6.1 and later. |
I've tried adding an element to the Message Definition Editor, with minOccurs=0, maxOccurs=10000, fixed length=1, but this results in a
Code: |
CPI Text Buffer Input Data Too Short |
How would you add such a trailer-element?
Sorry I asked: just found the End-Of-Bitstream option. |
|
Back to top |
|
 |
Amitha |
Posted: Fri Sep 24, 2010 7:12 am Post subject: |
|
|
 Voyager
Joined: 20 Nov 2009 Posts: 80 Location: Newyork
|
Quote: |
I've tried adding an element to the Message Definition Editor, with minOccurs=0, maxOccurs=10000, fixed length=1, but this results in a |
If you specify max occurs of 10000 the cwf parser expects that many occurrences of trailer element. you would be better off using maxoccurs of -1. |
|
Back to top |
|
 |
kimbert |
Posted: Sat Sep 25, 2010 11:07 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
just found the End-Of-Bitstream option. |
Good. That's the one you need.
Quote: |
If you specify max occurs of 10000 the cwf parser expects that many occurrences of trailer element. you would be better off using maxoccurs of -1.
|
As a developer who has worked on the MRM parser, I can confirm that Amitha is spot-on there. But don't use that technique anyway - End of Bitstream is what you need. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|