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 Index » WebSphere Message Broker (ACE) Support » In compute node, get nothing from root who contained value

Post new topic  Reply to topic
 In compute node, get nothing from root who contained value « View previous topic :: View next topic » 
Author Message
chris888
PostPosted: Mon Jul 19, 2010 5:48 pm    Post subject: In compute node, get nothing from root who contained value Reply with quote

Novice

Joined: 12 Jul 2010
Posts: 21

Message Set in workset:
Quote:
ZoomlionQMRfcInboundMessageSet
messageSet.mset
-Message Definitions
-com.ibm.www.websphere.crossworlds._2002.boschema.sapisqals
+sap_is_qals.mxsd
-com.ibm.www.websphere.crossworlds._2002.boschema.sapzgqqmi004mq
+sap_zgq_qm_i004_mq.mxsd




esql code:
Code:
DECLARE mq004_nls NAMESPACE 'http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq/';

CREATE PROCEDURE QMI004DataProcess( IN Environment REFERENCE,
IN InputRoot REFERENCE,
IN OutputRoot REFERENCE,
IN OutputLocalEnvironment REFERENCE )
BEGIN
   
   DECLARE sql_str CHARACTER;
   DECLARE error_flag BOOLEAN FALSE;
   DECLARE userSqlcode CHARACTER;
   DECLARE userSqlstate CHARACTER;
   DECLARE batchId INTEGER;   

   DECLARE MATERIAL_DESC CHARACTER;
   DECLARE SUPPLIER_NAME CHARACTER;
   DECLARE PURCHASE_ORGNAME CHARACTER;
   DECLARE tmpWerk CHARACTER;
      
      
   SET tmpWerk = InputRoot.XMLNSC.mq004_nls:sap_zgq_qm_i004_mq.sap_is_qals.sap_is_qals.WERK;
   ...



Here is the value list in the Variables pannel when WBT is in debug mode
Quote:
(X)=Variables
-InputRoot
+Properties
+MQMD
+MQRFH2
-XMLNSC
..+XmlDeclaration
..- sap_zgq_qm_i004_mq
.....Q1.........................http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq
.....version...................3.0.0
.....verb.......................Create
.....delta......................false
.....-sap_is_qals
.......-sap_is_qals
.........Q2.........................http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_is_qals
.........version...................3.0.0
.........verb.......................Create
.........delta......................false
.........WERK.....................2001
.........PRUEFLOS................010000002763
.........MATNR....................607617-11


my issue
I got null for tmpWerk, but there is value for WERK when I trace flow. The issue has been with me for couple of days, Can you help me with it? Thanks in advance
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 19, 2010 6:27 pm    Post subject: Re: In compute node, get nothing from root who contained va Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

chris888 wrote:
Message Set in workset:

Mostly irrelevant.

chris888 wrote:
[code]DECLARE mq004_nls NAMESPACE 'http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq/';

CREATE PROCEDURE QMI004DataProcess( IN Environment REFERENCE,
IN InputRoot REFERENCE,
IN OutputRoot REFERENCE,
IN OutputLocalEnvironment REFERENCE )

Snazzy.

Show us the line where you *call* it.

chris888 wrote:
Here is the value list in the Variables pannel when WBT is in debug mode

Snazzy.

Show us the usertrace.

Look, to be clear. Debugger view versus user trace view is *different*, particularly on "previous" versions of Broker. usertrace is *more reliable*.

More ... "importantly"?

You've indicated
DECLARE mq004_nls NAMESPACE 'http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq/';

And you've also indicated
.....Q1.........................http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq

These are *different* values.

"/" <> "".
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 19, 2010 7:47 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Also you are missing a namespace somewhere in your code:
Code:
InputRoot.XMLNSC.Q1:sap_zgq_qm_i004_mq.sap_is_qals.Q2:sap_is_qals.WERK;


Now you figure out the exact values for Q1 and Q2 (see your own and Jeff's posts), declare them as namespaces and you should be good...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
chris888
PostPosted: Mon Jul 19, 2010 9:08 pm    Post subject: Reply with quote

Novice

Joined: 12 Jul 2010
Posts: 21

Thank you Jeff and fjb_saper!

SapToQMI004Flow.esql
Code:
CREATE COMPUTE MODULE SapToQMI004Flow_Compute
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      CALL QMI004DataProcess(Environment,InputRoot,OutputRoot,OutputLocalEnvironment);
      CALL CopyEntireMessage();
      RETURN TRUE;
   END;

END;

   


QMI004Flow.esql
Code:
DECLARE Q1 NAMESPACE 'http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq';
DECLARE Q2 NAMESPACE 'http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_is_qals';
DECLARE zle NAMESPACE 'http://zoomlion.com/esb/';

/*
insert into table QM_CHECK_BATCH中,
*/
CREATE PROCEDURE QMI004DataProcess( IN Environment REFERENCE,
IN InputRoot REFERENCE,
IN OutputRoot REFERENCE,
IN OutputLocalEnvironment REFERENCE )
BEGIN
   --declare
   DECLARE sql_str CHARACTER;
   DECLARE error_flag BOOLEAN FALSE;
   DECLARE userSqlcode CHARACTER;
   DECLARE userSqlstate CHARACTER;
   DECLARE batchId INTEGER;   

   DECLARE MATERIAL_DESC CHARACTER;
   DECLARE SUPPLIER_NAME CHARACTER;
   DECLARE PURCHASE_ORGNAME CHARACTER;
   DECLARE tmpWerk CHARACTER;
   
   
   SET tmpWerk = InputRoot.XMLNSC.Q1:sap_zgq_qm_i004_mq.sap_is_qals.Q2:sap_is_qals.WERK;


still Null for tmpWerk.

usertrace info
Quote:
>> SqlFieldReference::evaluate file:/build/S610_P/src/DataFlowEngine/ImbRdl/ImbRdlFieldRef.cpp line:2779 message:2539.BIPv610 com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode 'Evaluation result ' , 'com.zoomlion.esb.qm.rfc.i004.QMI004DataProcess', '26.12', 'InputRoot.XMLNSC.http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq:sap_zgq_qm_i004_mq.sap_is_qals.http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_is_qals:sap_is_qals.WERK', 'NULL', 'InputRoot.XMLNSC.Q1:sap_zgq_qm_i004_mq.sap_is_qals.Q2:sap_is_qals.WERK', com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.209940 3652 >> UserTrace BIP2539I: Node 'com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute': Evaluating expression ''InputRoot.XMLNSC.Q1:sap_zgq_qm_i004_mq.sap_is_qals.Q2:sap_is_qals.WERK'' at ('com.zoomlion.esb.qm.rfc.i004.QMI004DataProcess', '26.12'). This resolved to ''InputRoot.XMLNSC.http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq:sap_zgq_qm_i004_mq.sap_is_qals.http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_is_qals:sap_is_qals.WERK''. The result was ''NULL''.
2010-07-20 06:28:21.209958 3652 >> } SqlFieldReference::evaluate com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.209970 3652 >> { SqlFieldReference::scalarVariableDataType com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , 1155dc5f0, com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.209984 3652 >> } SqlFieldReference::scalarVariableDataType com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210000 3652 >> { SqlFieldReference::setScalarVariable com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , 1155dc5f0, 'NULL', com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210012 3652 >> } SqlFieldReference::setScalarVariable com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210026 3652 >> } SqlAssignment::assignToVariable com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210038 3652 >> } SqlAssignment::execute com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210050 3652 >> { SqlAssignment::execute com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210084 3652 >> SqlAssignment::execute file:/build/S610_P/src/DataFlowEngine/ImbRdl/ImbRdlAssignment.cpp line:115 message:2537.BIPv610 com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode 'Executing statement at (&1, &2)' , 'com.zoomlion.esb.qm.rfc.i004.QMI004DataProcess', '27.2', 'SET TMP1 = qals1.XMLNSC.sap_zgq_qm_i004_mq.sap_is_qals.sap_is_qals.ART;', com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210084 3652 >> UserTrace BIP2537I: Node 'com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute': Executing statement ''SET TMP1 = qals1.XMLNSC.sap_zgq_qm_i004_mq.sap_is_qals.sap_is_qals.ART;'' at ('com.zoomlion.esb.qm.rfc.i004.QMI004DataProcess', '27.2').
2010-07-20 06:28:21.210114 3652 >> { SqlAssignment::assignToVariable com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210124 3652 >> { SqlFieldReference::evaluate com/zoomlion/esb/qm/rfc/i004/SapToQMI004#FCMComposite_1_8 ComIbmComputeNode , com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute
2010-07-20 06:28:21.210134 3652 >> { ImbMessage::ReadCursor::ReadCursor , 0,
2010-07-20 06:28:21.210142 3652 >> } ImbMessage::ReadCursor::ReadCursor ,
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 19, 2010 11:33 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Does 'WERK' have a namespace?
Your extract from the user trace stops too soon. If you read a little further it will tell you exactly how it executed that SET statement, and what the result was.

If you insert a Trace node then you will be able to compare your ESQL against the Trace node output, and see whether they match. Or you may find the same info in the Debugger, but it will be harder to paste the debugger output on this forum.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jul 20, 2010 12:09 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

I suspect this maybe at least part of your problem:

Code:
 CALL QMI004DataProcess(Environment,InputRoot,OutputRoot,OutputLocalEnvironment);
      CALL CopyEntireMessage();


Calling CopyEntireMessage() will delete everything under OutputRoot, and I'm guessing that your procedure tries to put something in OutputRoot which is then deleted. Either call CopyEntireMessage before your procedure, or just the parts of the Input message you actually need to your Output message and save some copy time...


Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
chris888
PostPosted: Tue Jul 20, 2010 6:26 pm    Post subject: Reply with quote

Novice

Joined: 12 Jul 2010
Posts: 21

kimbert wrote:
Does 'WERK' have a namespace?
Your extract from the user trace stops too soon. If you read a little further it will tell you exactly how it executed that SET statement, and what the result was.

If you insert a Trace node then you will be able to compare your ESQL against the Trace node output, and see whether they match. Or you may find the same info in the Debugger, but it will be harder to paste the debugger output on this forum.


there is no namespace for WERK.
and the next usertrace is for other information.




mgk wrote:
I suspect this maybe at least part of your problem:

Code:
 CALL QMI004DataProcess(Environment,InputRoot,OutputRoot,OutputLocalEnvironment);
      CALL CopyEntireMessage();


Calling CopyEntireMessage() will delete everything under OutputRoot, and I'm guessing that your procedure tries to put something in OutputRoot which is then deleted. Either call CopyEntireMessage before your procedure, or just the parts of the Input message you actually need to your Output message and save some copy time...


Regards,


I didn't operate OutputRoot, I just want to save info from InputRoot into database. So I think it is not relate to CopyEntireMessage().
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 20, 2010 7:20 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Is spaces for WERK a valid value?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
chris888
PostPosted: Tue Jul 20, 2010 10:51 pm    Post subject: Reply with quote

Novice

Joined: 12 Jul 2010
Posts: 21

fjb_saper wrote:
Is spaces for WERK a valid value?


Spaces can be a valid value for WERK.

I re-arranged the data of InputRoot from usertrace, every field have value

Quote:
<XMLNSC>
<Q1:sap_zgq_qm_i004_mq xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq" version="3.0.0" verb="Create" locale="zh_CN" delta="false">
<Q1:sap_is_qals>
<Q2:sap_is_qals xmlns:Q2="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_is_qals" version="3.0.0" verb="" locale="zh_CN" delta="false">
<Q2:WERK>2001</Q2:WERK>
<Q2:LAGORTCHRG/>
<Q2:PRUEFLOS>010000002773</Q2:PRUEFLOS>
<Q2:MATNR>607617-11</Q2:MATNR>
<Q2:HERKUNFT>01</Q2:HERKUNFT>
<Q2:ART>01</Q2:ART>
<Q2:PASTRTERM>2010-07-20</Q2:PASTRTERM>
<Q2:PASTRZEIT>00:00:00</Q2:PASTRZEIT>
<Q2:PAENDTERM>2010-07-20</Q2:PAENDTERM>
<Q2:PAENDZEIT>00:00:00</Q2:PAENDZEIT>
<Q2:SELLIFNR/><Q2:EKORG>2001</Q2:EKORG>
<Q2:EBELN>4500003047</Q2:EBELN>
<Q2:EBELP>00010</Q2:EBELP>
<Q2:MJAHR>2010</Q2:MJAHR>
<Q2:MBLNR>5000004913</Q2:MBLNR>
<Q2:ZEILE>0001</Q2:ZEILE>
<Q2:WERKVORG>2001</Q2:WERKVORG>
<Q2:LOSMENGE>2.000</Q2:LOSMENGE>
<Q2:MENGENEINH>KG</Q2:MENGENEINH>
<Q2:LMENGEIST>2.000</Q2:LMENGEIST>
<Q2:GESSTICHPR>0</Q2:GESSTICHPR>
<Q2:EINHPROBE>KG</Q2:EINHPROBE>
</Q2:sap_is_qals>
</Q1:sap_is_qals>

<Q1:ObjectEventId>SAPConnector_1279607301077_4</Q1:ObjectEventId>
</Q1:sap_zgq_qm_i004_mq>
</XMLNSC>


It seems like each field has a namespace Q2, but In my project, there is no namespace for these fields.
Back to top
View user's profile Send private message
chris888
PostPosted: Tue Jul 20, 2010 11:12 pm    Post subject: Reply with quote

Novice

Joined: 12 Jul 2010
Posts: 21

According to the date format in the usetrace, I *got* the value for WERK from InputRoot as following at last, But I am not clear why a namespace shoud be added before WERK, can someone help me explain it?

chris888 wrote:
kimbert wrote:
Does 'WERK' have a namespace?
Your extract from the user trace stops too soon. If you read a little further it will tell you exactly how it executed that SET statement, and what the result was.

If you insert a Trace node then you will be able to compare your ESQL against the Trace node output, and see whether they match. Or you may find the same info in the Debugger, but it will be harder to paste the debugger output on this forum.


there is no namespace for WERK.
and the next usertrace is for other information.


Really there is no namespace for WERK, it is weired!



Here is the correct code for getting value for 'WERK':
SET TMP = InputRoot.XMLNSC.Q1:sap_zgq_qm_i004_mq.Q1:sap_is_qals.Q2:sap_is_qals.Q2:WERK;




Here is the structure of sap_zgq_qm_i004_mq.mxsd
Quote:

-sap_zgq_qm_i004_mq.mxsd
...-Messages
.....-sap_zgq_qm_i004_mq
.......-{Local complexType}
..........@version
..........@delta
..........@locale
.........-@verb
..............xsd:NMTOKEN -
.........-E_RETURN
..............xsd:string -
.........-sap_is_qals
..........-{Local complexType}
............-sap_is_qals:sap_is_qals
..............-{Local complexType}
................@version
................@delta
................@locale
...............-@verb
...................xsd:NMTOKEN -
................-WERK
...................xsd:string -
................-LAGORTCHRG
...................xsd:string -
...


Last edited by chris888 on Tue Jul 20, 2010 11:30 pm; edited 3 times in total
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jul 20, 2010 11:27 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
According to the date format in the usetrace, I *got* the value for WERK from InputRoot as following at last, But I am not clear why, can someone help me explain it?
It's hard to do that using the information in this thread. You must have changed something, because a couple of posts ago you showed us a user trace where this field was clearly *not* present in InputRoot.
Code:
2010-07-20 06:28:21.209940 3652 >> UserTrace BIP2539I: Node 'com.zoomlion.esb.qm.rfc.i004.SapToQMI004.Compute': Evaluating expression ''InputRoot.XMLNSC.Q1:sap_zgq_qm_i004_mq.sap_is_qals.Q2:sap_is_qals.WERK'' at ('com.zoomlion.esb.qm.rfc.i004.QMI004DataProcess', '26.12'). This resolved to ''InputRoot.XMLNSC.http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_zgq_qm_i004_mq:sap_zgq_qm_i004_mq.sap_is_qals.http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_is_qals:sap_is_qals.WERK''. The result was ''NULL''.

My next step would be to take another user trace, find the equivalent entry, and compare the old with the new.

Quote:
I re-arranged the data of InputRoot from usertrace, every field have value
Tip1: Insert a Trace node into your message flow, and set the pattern to {Root}. Then you won't have to scan the user trace output to find the values.
Quote:
Here is the structure of sap_zgq_qm_i004_mq.mxsd
Tip2: use [code] tags when posting trace output - then you won't need to use .... for indentation.
Back to top
View user's profile Send private message
chris888
PostPosted: Tue Jul 20, 2010 11:41 pm    Post subject: Reply with quote

Novice

Joined: 12 Jul 2010
Posts: 21

Thank you so much Kimbert and other guys. Thank you for your time!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » In compute node, get nothing from root who contained value
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.