Author |
Message
|
scravr |
Posted: Wed Feb 06, 2013 1:08 pm Post subject: Parse DFDL in ESQL |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
Does "CREATE ... PARSE" work with DFDL?
I have DFDL dictionary that parses correctly via MQInput but refuse to parse in ESQL V8:
Can someone see what is missing:
CREATE COMPUTE MODULE myCompute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE tmp, inCCSID, inEncoding INT;
DECLARE ENV REFERENCE TO Environment.Variables;
SET inCCSID = CAST(InputRoot.Properties.CodedCharSetId AS INT);
SET inEncoding = CAST(InputRoot.Properties.Encoding AS INT);
SET ENV.CCSID = CAST(InputRoot.Properties.CodedCharSetId AS INT);
SET ENV.ENCODING = CAST(InputRoot.Properties.Encoding AS INT);
CREATE LASTCHILD OF OutputLocalEnvironment.InMsg DOMAIN('DFDL')
parse(InputRoot.BLOB.BLOB ENCODING inEncoding CCSID inCCSID SET '' TYPE '{}:MYMSG' FORMAT '');
CREATE LASTCHILD OF ENV.InMsg DOMAIN('DFDL')
parse(InputRoot.BLOB.BLOB ENCODING inEncoding CCSID inCCSID SET '' TYPE '{}: MYMSG' FORMAT '');
-- PARSE(InputRoot.BLOB.BLOB,0,1208,'','{}: MYMSG','',RootBitStream);
-- PARSE(InputRoot.BLOB.BLOB,inEncoding,inEncoding,'','{}: MYMSG','',RootBitStream);
-- parse(InputRoot.BLOB.BLOB ENCODING 0 CCSID 1208 SET '' TYPE '{}: MYMSG' FORMAT '');
-- parse(InputRoot.BLOB.BLOB ENCODING inEncoding CCSID inCCSID SET '' TYPE '{}: MYMSG' FORMAT '');
set OutputRoot.Properties = InputRoot.Properties;
set OutputRoot.MQMD = InputRoot.MQMD;
set OutputRoot.DFDL = OutputLocalEnvironment.InMsg.DFDL;
RETURN TRUE;
END;
END MODULE;
All above “parse” statements always generating this:
ParserException
File:CHARACTER:F:\build\slot1\S800_P\src\MTI\MTIforBroker\DfdlParser\ImbDFDLDocHandler.cpp
Line:INTEGER:242
Function:CHARACTER:ImbDFDLDocHandler::getDFDLParser
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:5822
Text:CHARACTER:Cannot continue - messageTypeName is empty
Reg,
MA |
|
Back to top |
|
 |
kimbert |
Posted: Wed Feb 06, 2013 3:27 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Does "CREATE ... PARSE" work with DFDL? |
Well, it certainly *should*. CREATE...PARSE should work with any parser.
Quote: |
Text:CHARACTER:Cannot continue - messageTypeName is empty |
Please can you take a debug-level user trace, and post the relevant part. It should show what is being passed to the DFDL parser as the messageType parameter. |
|
Back to top |
|
 |
scravr |
Posted: Thu Feb 07, 2013 8:07 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
Scenario:
DFDL dictionary (created via COBOL copybook as a “message model”), reside in a LIB, deployed to EG via BAR reside within same LIB.
A test msg generated via “Create Logical Instance”, “DFDL Test –Serialize”, and tested via “DFDL Test – Parse”.
An App contains 3 flows deployed to same EG via BAR reside within the App.
Flow1: Successfully parses DFDL on MQInput, ESQL Compute can manipulate the parsed DFDL and message name {}:CDTLOGMSGHEADER
Flow2: MQInput gets msg as BLOB; while debugging ESQL line-by-line the CREATE PARSE fails. Debugging MQInput only and then RUN to end of flow works file. Test without debug works fine as well.
Flow3: MQInput gets msg as BLOB, JAVA fails on:
MbElement DfdlRoot = envRoot.createElementAsLastChildFromBitstream(Msgb,"DFDL",null,null,null,0,0,0); // returns bip5822.
Here is the beginning trace for Flow1:
Timestamps are formatted in local time, 300 minutes before GMT.
Trace written by version 8001; formatter version 8001 (build S800-L120815 on x86_nt_4)
2013-02-07 08:26:02.006728 6172 UserTrace BIP4040I: The Execution Group ''DfdlApp'' has processed a configuration message successfully.
A configuration message has been processed successfully. Any configuration changes have been made and stored persistently.
No user action required.
2013-02-07 08:26:02.007196 6172 UserTrace BIP2638I: The MQ output node '.outputNode' attempted to write a message to queue ''SYSTEM.BROKER.EXECUTIONGROUP.REPLY'' connected to queue manager ''MB8QMGR''. The MQCC was '0' and the MQRC was '0'.
2013-02-07 08:26:02.007241 6172 UserTrace BIP2622I: Message successfully output by output node '.outputNode' to queue ''SYSTEM.BROKER.EXECUTIONGROUP.REPLY'' on queue manager ''MB8QMGR''.
2013-02-07 08:26:02.007565 6172 Information BIP2154I: Execution group finished with Configuration message.
A command response will be sent to the broker.
No user action required.
2013-02-07 08:27:02.071856 5312 UserTrace BIP11501I: Received data from input node ''MQ Input''.
The input node ''MQ Input'' has received data and has propagated it to the message flow ''SHORT_TEST_DFDL_MQINPUT''.
2013-02-07 08:27:02.098349 5312 UserTrace BIP2632I: Message received and propagated to 'out' terminal of MQ input node 'SHORT_TEST_DFDL_MQINPUT.MQ Input'.
2013-02-07 08:27:02.098489 5312 UserTrace BIP6060I: Node 'SHORT_TEST_DFDL_MQINPUT.MQ Input' used parser type ''Properties'' to process a portion of the incoming message of length '0' bytes beginning at offset '0'.
2013-02-07 08:27:02.098548 5312 UserTrace BIP6061I: Node 'SHORT_TEST_DFDL_MQINPUT.MQ Input' used parser type ''MQMD'' to process a portion of the incoming message of length '364' bytes beginning at offset '0'. The parser type was selected based on value ''MQHMD'' from the previous parser.
2013-02-07 08:27:02.098901 5312 UserTrace BIP6061I: Node 'SHORT_TEST_DFDL_MQINPUT.MQ Input' used parser type ''DFDL'' to process a portion of the incoming message of length '4783' bytes beginning at offset '364'. The parser type was selected based on value ''DFDL'' from the previous parser.
2013-02-07 08:27:02.098977 5312 UserTrace BIP4060I: Data ''
'' from trace node 'SHORT_TEST_DFDL_MQINPUT.Trace'.
The trace node 'SHORT_TEST_DFDL_MQINPUT.Trace' has output the specified trace data.
This is an information message provided by the message flow designer. The user response will be determined by the local environment.
2013-02-07 08:27:02.099143 5312 UserTrace BIP4067I: Message propagated to output terminal for trace node 'SHORT_TEST_DFDL_MQINPUT.Trace'.
The trace node 'SHORT_TEST_DFDL_MQINPUT.Trace' has received a message and is propagating it to any nodes connected to its output terminal.
No user action required.
Here is trace for Flow2 when debugging MQInput only then run-to-end-of-flow:
2013-02-07 10:52:41.123920 740 UserTrace BIP2537I: Node 'SHORT_TEST_DFDL_ESQL.Compute': Executing statement ''CREATE LASTCHILD OF OutputLocalEnvironment.InMsg DOMAIN 'DFDL' PARSE(InputRoot.BLOB.BLOB, inEncoding, inCCSID, '', '{}:CDTLOGMSGHEADER', '');'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '11.2').
2013-02-07 10:52:41.124179 740 UserTrace BIP2539I: Node '': Evaluating expression ''InputRoot.BLOB.BLOB'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '12.13'). This resolved to ''InputRoot.BLOB.BLOB''. The result was ''X'4c4f474d3031303130303030202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020…….
2013-02-07 10:52:41.124439 740 UserTrace BIP2539I: Node '': Evaluating expression ''inEncoding'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '12.42'). This resolved to ''inEncoding''. The result was ''546''.
2013-02-07 10:52:41.124507 740 UserTrace BIP2539I: Node '': Evaluating expression ''inCCSID'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '12.59'). This resolved to ''inCCSID''. The result was ''437''.
This flow runs fine
Flow2 tace with complete debug of ESQL:
2013-02-07 10:52:55.095386 740 UserTrace BIP2537I: Node 'SHORT_TEST_DFDL_ESQL.Compute': Executing statement ''CREATE LASTCHILD OF OutputLocalEnvironment.InMsg DOMAIN 'DFDL' PARSE(InputRoot.BLOB.BLOB, inEncoding, inCCSID, '', '{}:CDTLOGMSGHEADER', '');'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '11.2').
2013-02-07 10:52:55.915481 740 UserTrace BIP2539I: Node '': Evaluating expression ''InputRoot.BLOB.BLOB'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '12.13'). This resolved to ''InputRoot.BLOB.BLOB''. The result was ''X'4c4f474d3031303130303030202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020……..
2013-02-07 10:52:55.916370 740 UserTrace BIP2539I: Node '': Evaluating expression ''inEncoding'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '12.42'). This resolved to ''inEncoding''. The result was ''546''.
2013-02-07 10:52:55.916431 740 UserTrace BIP2539I: Node '': Evaluating expression ''inCCSID'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '12.59'). This resolved to ''inCCSID''. The result was ''437''.
2013-02-07 10:52:55.916538 740 UserTrace BIP2537I: Node 'SHORT_TEST_DFDL_ESQL.Compute': Executing statement ''SET tmp = 1;'' at ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '14.5').
2013-02-07 10:52:57.953971 740 UserTrace BIP2231E: Error detected whilst processing a message in node 'SHORT_TEST_DFDL_ESQL.MQ Input'.
The message broker detected an error whilst processing a message in node 'SHORT_TEST_DFDL_ESQL.MQ Input'. The message has been augmented with an exception list and has been propagated to the node's failure terminal for further processing.
See the following messages for details of the error.
2013-02-07 10:52:57.954006 740 RecoverableException BIP2230E: Error detected whilst processing a message in node 'SHORT_TEST_DFDL_ESQL.Compute'.
The message broker detected an error whilst processing a message in node 'SHORT_TEST_DFDL_ESQL.Compute'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2013-02-07 10:52:57.954040 740 RecoverableException BIP2488E: ('.SHORT_TEST_DFDL_ESQL_Compute.Main', '14.5') Error detected whilst executing the SQL statement ''SET tmp = 1;''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2013-02-07 10:52:57.954059 740 ParserException BIP5822E: The DFDL parser requires a valid document root.
The DFDL parser requires a valid document root, but the field was empty. DFDL parsing has stopped.
Possible causes are:
1. The document root has not been specified on the node.
2. The document root is not present in the Properties folder in the message tree.
3. The TYPE clause was not specified in ESQL for a CREATE ... PARSE statement.
4. The messageType parameter was not specified in Java for a createElementAsLastChildFromBitstream call. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 07, 2013 9:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I think this is a product defect. If you open a PMR you should be able to get a fix. |
|
Back to top |
|
 |
DRM |
Posted: Thu Apr 18, 2013 7:34 pm Post subject: This worked for me |
|
|
Newbie
Joined: 18 Apr 2013 Posts: 6
|
Hi,
I also had the same issue, but after some trial and error, this worked for me.
CALL CopyMessageHeaders();
DECLARE inCCSID, inEncoding INT;
SET inCCSID = CAST(InputRoot.Properties.CodedCharSetId AS INT);
SET inEncoding = CAST(InputRoot.Properties.Encoding AS INT);
SET OutputRoot.Properties.MessageType='{myNS}:GSIRHIINPUT';
CREATE LASTCHILD OF OutputRoot DOMAIN('DFDL')
PARSE(InputRoot.BLOB.BLOB ENCODING inEncoding CCSID inCCSID SET '' TYPE '{myNS}:GSIRHIINPUT' OPTIONS RootBitStream);
RETURN TRUE;
--drm |
|
Back to top |
|
 |
scravr |
Posted: Fri Apr 19, 2013 7:09 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
this was fixed on 8.0.0.2 |
|
Back to top |
|
 |
scravr |
Posted: Mon May 06, 2013 7:20 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
broker on Linux/unix is maintained by other admin group.
developers responsible for individual toolkit.
what will not work if toolkit is upgraded? |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 06, 2013 7:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
scravr wrote: |
what will not work if toolkit is upgraded? |
Any functionality introduced in 8.0.0.2. I think there's an echo in here... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
j.f.sorge |
Posted: Fri Sep 27, 2013 4:11 am Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
scravr wrote: |
this was fixed on 8.0.0.2 |
Do you know the APAR number in order to be able to receive a private fix? _________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
kimbert |
Posted: Fri Sep 27, 2013 5:06 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Which version of WMB are you using? _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
j.f.sorge |
Posted: Fri Sep 27, 2013 5:23 am Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
kimbert wrote: |
Which version of WMB are you using? |
Currently we're on WMB 8.0.0.1. Problems seem to occur within message flows debug only but it would be nice if that works correctly within debug, too. _________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Sep 27, 2013 5:29 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
j.f.sorge wrote: |
kimbert wrote: |
Which version of WMB are you using? |
Currently we're on WMB 8.0.0.1. Problems seem to occur within message flows debug only but it would be nice if that works correctly within debug, too. |
Why not the latest fixpack ? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
j.f.sorge |
Posted: Fri Sep 27, 2013 5:37 am Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
lancelotlinc wrote: |
j.f.sorge wrote: |
kimbert wrote: |
Which version of WMB are you using? |
Currently we're on WMB 8.0.0.1. Problems seem to occur within message flows debug only but it would be nice if that works correctly within debug, too. |
Why not the latest fixpack ? |
Because I wanted to check the fixlist (for the APAR I asked) before upgrading the test environment. _________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
kimbert |
Posted: Fri Sep 27, 2013 5:58 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I would recommend a prompt upgrade to v8.0.0.2, regardless of whether you believe that it will fix this problem. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
j.f.sorge |
Posted: Fri Sep 27, 2013 6:05 am Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
kimbert wrote: |
I would recommend a prompt upgrade to v8.0.0.2, regardless of whether you believe that it will fix this problem. |
Thanks a lot for this good advice but only FP3 will contain the other fixes I really need. Therefore I'll keep waiting because otherwise I have to re-request private fixes for errors which still exist in FP2. _________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|