Author |
Message
|
chris boehnke |
Posted: Wed May 16, 2007 10:22 am Post subject: How to debug the code for PARSING? |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi,
I have created a new messageset for Cobol Copybook and I am debugging the messageflow to know the output.
The incoming data is BLOB. The outcoming data is going to be MRM.
There is a piece of code which is irritating me and I am unble to findout to where I am doing a mistake...
The code is:
CREATE LASTCHILD OF OutputRoot DOMAIN 'MRM'
PARSE(InputBody."BLOB",
InputRoot.Properties.Encoding, InputRoot.Properties.CodedCharSetId,
'msgset123', -- MessageSet
'msg_ESBMESSAGEHEADER', -- MessageType
'CWF'); -- MessageFormat
When I am debugging the code, when I reach to the above piece of code in a Compute node, I am getting a parsing error(ImbRecoverableException caught from worker->ParseNext).
Thanks.
Chris. |
|
Back to top |
|
 |
jbanoop |
Posted: Wed May 16, 2007 10:34 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
as far as I know there is no way to debug that.
That statement invokes the MRM parser of the broker which is not visible from the toolkit.
what you can do is to look carefully at the error stack to identify which part is causing the error.. |
|
Back to top |
|
 |
mqsid |
Posted: Wed May 16, 2007 10:49 am Post subject: |
|
|
Newbie
Joined: 26 Jan 2007 Posts: 5
|
I don't think you need quotes for "BLOB" in InputBody."BLOB".
I am not sure if this works but
Can you try this,
DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.BLOB CCSID InputRoot.Properties.CodedCharSetId);
CREATE LASTCHILD OF OutputRoot DOMAIN 'MRM'
PARSE(bodyBlob,
InputRoot.Properties.Encoding, InputRoot.Properties.CodedCharSetId,
'msgset123', -- MessageSet
'msg_ESBMESSAGEHEADER', -- MessageType
'CWF'); -- MessageFormat |
|
Back to top |
|
 |
chris boehnke |
Posted: Wed May 16, 2007 11:05 am Post subject: tried mqsid suggestion but no difference in the output |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi,
Actually the flow is just working fine with a cobol copybook(older one), now we got a new requirement with a new cobol copybook. So when I try to create a message set with the new cobol copybook I am getting the parsing error.
When I reach the above piece of code, Some fields are populating and the last three fields are not populating and getting a parsing error. I dont know how to findout what is wrong and how to correct.
By the way MQSID, I tried your suggestion and there is no difference in the output when we use the "BLOB" or without quotes(your piece of code). Both are working one and the same and getting the same user parsing error.
Please suggest how to figure out.
Thanks.
Chris. |
|
Back to top |
|
 |
chris boehnke |
Posted: Wed May 16, 2007 11:20 am Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi mqsid,
The Inputroot.BLOB and the MRM bodyBlob are not one and the same. There are 4 last characters missing in the bodyBlob variable. Do you think this is the reason why not all the fields are populated onto the destination?.
Let me know...How can we trace this?.
Thanks.
Sampath |
|
Back to top |
|
 |
jbanoop |
Posted: Wed May 16, 2007 11:34 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
from the debug pespective find exactly after which field the error is being thrown.
now go to ur copybook structure and have a look at what that field is and correspondingly o what it has been mapped in the message set.
There might probably be some mismatch in the type or size.
Also have alook at the syslog/event log which might give you a more detailed error ..
the error would be "ImbRecoverableException caught from worker->ParseNext" but the reason why the parse is failing is your actual root cause. |
|
Back to top |
|
 |
kimbert |
Posted: Wed May 16, 2007 12:22 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Just to confirm what jbanoop said : parsing exceptions usually come with lots of detail. What you have quoted is just what's visible in the debugger. Check the system log. If you get no joy there, take a user trace, and you will definitely get the full text of the exception. |
|
Back to top |
|
 |
chris boehnke |
Posted: Wed May 16, 2007 1:24 pm Post subject: |
|
|
 Partisan
Joined: 25 Jul 2006 Posts: 369
|
Hi Kimbert,
I am using a trace node just after the compute node where I am getting the parsing error. Actually I am using my Toolkit to connect to the broker which is on the other box.
If I use the trace node in the flow in my toolkit and deploy onto the broker...is there anyway to write the error record on my local computer. If so please let me how I need to do.
Thanks.
Chris |
|
Back to top |
|
 |
jbanoop |
Posted: Wed May 16, 2007 1:33 pm Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
use the mqsi trace commands to set up a trace on the box with the broker.
mqsichangetrace
mqsireadlog
mqsiformatlog
read up on these commands .. yes the the trace would be written onto a file you specify on the broker box.
However I strongly believe that monitoring the syslog of the broker (sysog.user on AIX) would give you more information on the error.
Trace node i suspect is not going to help you much .. |
|
Back to top |
|
 |
|