ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker (ACE) Supportmessage parsing error with all fields null

Post new topicReply to topic
message parsing error with all fields null View previous topic :: View next topic
Author Message
lium
PostPosted: Thu May 27, 2010 8:45 am Post subject: message parsing error with all fields null Reply with quote

Disciple

Joined: 17 Jul 2002
Posts: 184

When working on a message set, The input is all ascii text in lines. Each line is record with 8 fields which are separated by comma.
There is line like ,,,,,,, which has all value null. This line happens after subtotal of invoice lines. If any field has a value even a space, the message can be parsed correctly. If not, there will be problem parsing this line with information in WMB debug: CHARACTER:ImbRecoverableException caught from worker->parseNext. And all lines after this line can not be parsed correctly. The setting of Text_CSV in the message.mset under Tagged/Delimited String Formats is like the following:
Messaging Standard: User Defined Mixed – for mixed text and binary data
Data element separation settings:
Group Indicator:
Group Terminator:
Delimiter: <CR><LF>
Suppress Absent Element Delimiters: End Of Type
Distinguish tag and data values using:
Tag Data Separator:
Length of Tag:
Character data settings:
Default CCSID: 850
Fixed length strings:
Trim on input: No Trim
Truncate on output: Not checked
Escape Character: (this field is disabled in grey)
Quote character: “
Reserved Characters:

This problem can be solved by changing the Messaging Standard to “CSV – Comma Separated Values” with default setting as following:

Messaging Standard: CSV – Comma Separated Values
Data element separation settings:
Group Indicator:
Group Terminator:
Delimiter: ,
Suppress Absent Element Delimiters: Never
Distinguish tag and data values using:
Tag Data Separator:
Length of Tag:
Character data settings:
Default CCSID: 376
Fixed length strings:
Trim on input: No Trim
Truncate on output: Not checked
Escape Character: (this field is disabled in grey)
Quote character: “
Reserved Characters:,<CR><LF>”

The question is:
I would like to stay with User Defined Mixed, what change I can make to fix this parsing problem?


Great Tx
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 27, 2010 8:59 am Post subject: Re: message parsing error with all fields null Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

lium wrote:
I would like to stay with User Defined Mixed


Why? If the lines are all text with comma delimiters what about the CSV template doesn't meet your requirements?

More information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lium
PostPosted: Thu May 27, 2010 9:04 am Post subject: Reply with quote

Disciple

Joined: 17 Jul 2002
Posts: 184

One of the reason is we already have some message types defined in "User Defined Mixed". We would like to keep all message types in the same message set if possible.
What to do to make the "User Defined Mixed" to accept a line with all fields in null?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 27, 2010 9:11 am Post subject: Re: message parsing error with all fields null Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lium wrote:
CHARACTER:ImbRecoverableException caught from worker->parseNext.


This is not an error message.

Take a user trace processing the message.

Examine it carefully. Examine the error messages CAREFULLY.

Post the full error message.
Back to top
View user's profile Send private message
lium
PostPosted: Thu May 27, 2010 9:55 am Post subject: Reply with quote

Disciple

Joined: 17 Jul 2002
Posts: 184

Tx for reply, mqjeff.
You are correct. There is no exception, and from the trace everything is ok. But the lines after ,,,,,,, are all gone.
Actually, this is a common topic, if record with all fields with value null, how the WMB deal with this situation? With CSV, the WMB will skip this record and it will not be presented to user.
Can I say the User Define Mixed will never accept this situation?
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 27, 2010 11:34 am Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

By default, the MRM parser does not put zero-length fields into the message tree. You can get them into the tree, though. You have to tell the MRM TDS parser that a zero-length field should be treated as a 'null' value.
In the Logical properties for the element(s):
- Set the 'Nillable' property to 'true'. If you don't do this, null handling is disabled.
- In the TDS properties for the element(s):
- set Encoding Null to 'Null Literal Value'
- set 'Encoding Null Value' to the empty string

You should now see the empty fields in the message tree, with the value NULL ( not '' ).

The technique is documented here :http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ad06830_.htm
The example in the docs is for handling blank lines, but it applies just as well to your scenario.
Back to top
View user's profile Send private message
lium
PostPosted: Mon May 31, 2010 10:02 am Post subject: Reply with quote

Disciple

Joined: 17 Jul 2002
Posts: 184

Great Thanks, will do in this way
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) Supportmessage parsing error with all fields null
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.