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 » Set CorrelId into message MQMD

Post new topic  Reply to topic
 Set CorrelId into message MQMD « View previous topic :: View next topic » 
Author Message
syangloo
PostPosted: Mon May 23, 2005 1:14 pm    Post subject: Set CorrelId into message MQMD Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

Dear all

Is me again, this time i try to select the value from a table and set it to the message MQMD.correlid field. Deploy successfully and already added the DB and table name into the compute node.

No error occure when put the message into the message flow.

Now my problem is the CorrelId field is empty. (debug it, and find out the CorrelId field is not in the message MQMD).

Did my ESQL is correct? How can i check i select out the data from the table or not and it the row of data i looking for?

Below is my ESQL for it:

Code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.

DECLARE Corrid CHARACTER;
DECLARE rquid CHARACTER;

--Set rquid = UCASE(RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID));
Set Corrid = RTRIM(THE (SELECT ITEM A2.TXNID FROM Database.TRANSACTION_ID AS A2 WHERE A2.RQUID = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID)));
SET OutputRoot.MQMD.CorrelId = Corrid;
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
paustin_ours
PostPosted: Mon May 23, 2005 1:25 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

the output of the select statement is a list. I had to do something like this a while ago, I set the Output of the select statement to a environment variable like temp[]. the output of the statement will be stored under temp as a first child. You can grab it from there and construct your OutputRoot.

Hope this helps.
Back to top
View user's profile Send private message Yahoo Messenger
mayur2378
PostPosted: Mon May 23, 2005 1:40 pm    Post subject: Reply with quote

Apprentice

Joined: 26 May 2004
Posts: 47

Like psutin mentioned, save the result from the database into an environment variable and to check wats been set put a trace after this node with properties set to root and evironment so verify if the correlid is actually being set.

Hope it helps

Mayur
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Mon May 23, 2005 1:55 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Make sure that your MQOutput node properties are correctly set.

Make sure that the MQMD has the right value by putting a trace node right before your MQOutput node.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
syangloo
PostPosted: Mon May 23, 2005 3:28 pm    Post subject: Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

Thanks for you reply....

Below is the code i try to set the data from table into environment. Not sure the ESQL is correct or not....
Bcos i still getting nothing.


Code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.

DECLARE Corrid CHARACTER;
DECLARE rquid CHARACTER;

--Set rquid = UCASE(RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID));
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].CorrelId = RTRIM(THE (SELECT ITEM A2.TXNID FROM Database.TRANSACTION_ID AS A2 WHERE A2.RQUID = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID)));
--Set Corrid = RTRIM(THE (SELECT ITEM A2.TXNID FROM Database.TRANSACTION_ID AS A2 WHERE A2.RQUID = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID)));
SET OutputRoot.MQMD.CorrelId = OutputLocalEnvironment.Destination.MQ.DestinationData[1].CorrelId;


I set the trace to display the localenvironment, but is empty.....

Regards
syangloo
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Mon May 23, 2005 3:32 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Make sure your compute node is set to pass the local environment.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Saugui
PostPosted: Mon May 23, 2005 4:03 pm    Post subject: Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 23

There's a debug tool call usertrace which you can download to help you with debugging the flow. It dumps a log file (which can be a nightmare to read), but very helpful as it print each line of execution of theesql and the value of each variable if you set the usertrace to debug.
Back to top
View user's profile Send private message
syangloo
PostPosted: Mon May 23, 2005 4:52 pm    Post subject: Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

Dear All

Below is my new ESQL for it.

Code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.

DECLARE Corrid CHARACTER;
DECLARE rquid CHARACTER;

--Set rquid = UCASE(RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID));
 SET OutputLocalEnvironment.Variables = RTRIM(THE (SELECT ITEM A2.TXNID FROM Database.TRANSACTION_ID AS A2 WHERE A2.RQUID = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID)));
--Set Corrid = RTRIM(THE (SELECT ITEM A2.TXNID FROM Database.TRANSACTION_ID AS A2 WHERE A2.RQUID = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID)));
SET OutputRoot.MQMD.CorrelId = OutputLocalEnvironment.Variables;


Base on the debugging the message flow, i can getting the CorrelId i need but now i getting the XML format catch error with the error code BIP2328E. This error happen when the message flow try to put the message into another subflow

I try Copy message header and Copy entire message but in the trace file, i still cant see any localenvironment value display out.... but this not the big problem now, bcos i getting the data i need...


Regards
Syangloo
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
fschofer
PostPosted: Tue May 24, 2005 12:17 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
Quote:
There's a debug tool call usertrace which you can download to help you with debugging the flow. It dumps a log file (which can be a nightmare to read), but very helpful as it print each line of execution of theesql and the value of each variable if you set the usertrace to debug.

Usertraces are included in the product since MQSI Version 2.0
=> commands: mqsichangetrace, mqsireadlog, mqsiformatlog

In my opinion running a debug trace is the best way to find problems within ESQL.

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
syangloo
PostPosted: Fri May 27, 2005 6:51 pm    Post subject: Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

Hi All,

What is the error message mean?

My Transaction_id table content two field (DB2)
TXNID - BLOB - 80 bytes
RQUID - VARCHAR - 60 bytes

Compute Node i insert the request message msgid into DB

Code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.

DECLARE MID BLOB;
DECLARE rquid CHARACTER;

Set MID = OutputRoot.MQMD.MsgId;
--Set rquid = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID);
INSERT INTO Database.TRANSACTION_ID(TXNID,RQUID) VALUES (RTRIM(MID),RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID));
SET OutputLocalEnvironment = InputLocalEnvironment;



Compute node to select out the msgid and set it to the response message CorreId
Code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.

DECLARE Corrid BLOB;
DECLARE rquid CHARACTER;

Set Corrid = LTRIM(THE (SELECT ITEM A2.TXNID FROM Database.TRANSACTION_ID AS A2 WHERE A2.RQUID = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2].RqUID)));
SET OutputRoot.MQMD.CorrelId = Corrid;
SET Environment.Variables.MyID = NULL;


Quote:

( QMBKKL001.RQRP ) Length of parser field name 'CorrelId' was '23'. It should be '24'.

The length of the value does not match the required length for the field.

Correct the application (or compute expression) that generated the message.


Quote:
( QMBKKL001.RQRP ) Error in parser 'MQMD' whilst writing the field named 'CorrelId' to the bitstream.

This message gives the name of the field in the parser that was being written at the time the error occurred. The parser was trying to write '' into this field.

You should check for other messages issued with this one for the full context of the error.


WHAT SHOULD I DO FOR THIS ERROR? Where to set the length of the fields? DB or ESQL?

Regards
Syangloo
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
EddieA
PostPosted: Sat May 28, 2005 3:40 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
WHAT SHOULD I DO FOR THIS ERROR?

You should not trim the BLOB fields.

Cheers,
_________________
Eddie Atherton
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
syangloo
PostPosted: Tue May 31, 2005 4:45 pm    Post subject: Reply with quote

Centurion

Joined: 01 Oct 2002
Posts: 120
Location: Kuala Lumpur

Thanks EddieA

It work now.

Thanks for your help, enjoy you days.

Take care
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Set CorrelId into message MQMD
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.