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) SupportParse DFDL in ESQL

Post new topicReply to topic Goto page 1, 2  Next
Parse DFDL in ESQL View previous topic :: View next topic
Author Message
scravr
PostPosted: Wed Feb 06, 2013 1:08 pm Post subject: Parse DFDL in ESQL Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
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
View user's profile Send private message Send e-mail MSN Messenger
kimbert
PostPosted: Wed Feb 06, 2013 3:27 pm Post subject: Reply with quote

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
View user's profile Send private message
scravr
PostPosted: Thu Feb 07, 2013 8:07 am Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
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
View user's profile Send private message Send e-mail MSN Messenger
kimbert
PostPosted: Thu Feb 07, 2013 9:24 am Post subject: Reply with quote

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
View user's profile Send private message
DRM
PostPosted: Thu Apr 18, 2013 7:34 pm Post subject: This worked for me Reply with quote

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
View user's profile Send private message
scravr
PostPosted: Fri Apr 19, 2013 7:09 am Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
Location: NY NY USA 10021

this was fixed on 8.0.0.2
Back to top
View user's profile Send private message Send e-mail MSN Messenger
scravr
PostPosted: Mon May 06, 2013 7:20 am Post subject: Reply with quote

Partisan

Joined: 03 Apr 2003
Posts: 388
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
View user's profile Send private message Send e-mail MSN Messenger
Vitor
PostPosted: Mon May 06, 2013 7:50 am Post subject: Reply with quote

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
View user's profile Send private message
j.f.sorge
PostPosted: Fri Sep 27, 2013 4:11 am Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Fri Sep 27, 2013 5:06 am Post subject: Reply with quote

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
View user's profile Send private message
j.f.sorge
PostPosted: Fri Sep 27, 2013 5:23 am Post subject: Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Fri Sep 27, 2013 5:29 am Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
j.f.sorge
PostPosted: Fri Sep 27, 2013 5:37 am Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Fri Sep 27, 2013 5:58 am Post subject: Reply with quote

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
View user's profile Send private message
j.f.sorge
PostPosted: Fri Sep 27, 2013 6:05 am Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportParse DFDL in ESQL
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.