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 » Not getting InputBody in compute node.

Post new topic  Reply to topic
 Not getting InputBody in compute node. « View previous topic :: View next topic » 
Author Message
know_ashu
PostPosted: Tue Aug 23, 2005 11:27 pm    Post subject: Not getting InputBody in compute node. Reply with quote

Novice

Joined: 25 Jun 2005
Posts: 22

I have my message flow as below:
MQInput Node -->Compute Node -->Trace Node -----> Filter Node -----> MQOutputNode

Sample Message (Coming as TextMessage from java program):

FSAFSIUFGAFSDFSLGSADLEOUOEP

Compute Node :
SET OutputRoot = InputRoot;

DECLARE MSG CHARACTER;
DECLARE MSGLEN INTEGER;
DECLARE A CHARACTER;
DECLARE A_START_POS INTEGER 2;
DECLARE A_LEN INTEGER 2;
DECLARE B CHARACTER;
DECLARE B_START_POS INTEGER 10;
DECLARE B_LEN INTEGER 1;
DECLARE CNT INTEGER 0;

-- GET THE MESSAGE AS CHARACTER --
SET MSG = CAST(InputBody AS CHARACTER);
SET Environment.Variable.Msg = MSG;

-- GET REQUEST_KEY FROM MESSAGE
SET A = TRIM(SUBSTRING(MSG FROM A_START_POS FOR A_LEN));
SET Environment.Variable.REQ_KEY = A;

-- GET STATUS FROM MESSAGE
--SET B = TRIM(SUBSTRING(MSG FROM B_START_POS FOR B_LEN));
--SET Environment.Variable.STATUS = B;

SET OutputRoot.*[] = (select T.REQ_KEY AS REQUEST from Database.TRAK AS T WHERE T.REQ_KEY = Environment.Variable.REQ_KEY);
SET CNT = CARDINALITY(OutputRoot.*[]);
SET Environment.Variable.COUNT = CNT;
IF (CNT < 1)
THEN
SET Environment.Variable.Message.Destination = 'XXX';
ELSE
SET Environment.Variable.Message.Destination = 'YYY';
END IF;

Trace Node:
Body = ${Body}
Environment = ${Environment};
Environment.Variable.Msg = ${Environment.Variable.Msg};

Filter Node:

IF Environment.Variable.Message.Destination = 'YYY'
THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;

Output From TraceNode is as below: (Body is blank, MSG is NULL)?
Body =
Environment = (
(0x1000000)Variable = (
(0x3000000)COUNT = 0
(0x1000000)Message = (
(0x3000000)Destination = 'XXX'
)
)
);
Environment.Variable.Msg = NULL;
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Aug 24, 2005 12:27 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

In the Debug mode are u receiving the message at a breakpoint between Input and compute node....???

What are the Input Node properties....???
Back to top
View user's profile Send private message Send e-mail
mgk
PostPosted: Wed Aug 24, 2005 12:39 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Put another trace node before the compute node, and log ${Root} and post that here.
_________________
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
javaforvivek
PostPosted: Wed Aug 24, 2005 1:13 am    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

know_ashu wrote:
Quote:
Sample Message (Coming as TextMessage from java program):

FSAFSIUFGAFSDFSLGSADLEOUOEP


Is your client a simple java program or a JMS client?
If it is JMS client, then there are two parsers : JMSMAp and JMSStream.
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
know_ashu
PostPosted: Wed Aug 24, 2005 1:14 am    Post subject: trace before compute node Reply with quote

Novice

Joined: 25 Jun 2005
Posts: 22

When I put a trace node before compute node the value of ${Root} is as below:
Root = (
(0x1000000)Properties = (
(0x3000000)MessageSet = ''
(0x3000000)MessageType = ''
(0x3000000)MessageFormat = ''
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 1208
(0x3000000)Transactional = TRUE
(0x3000000)Persistence = TRUE
(0x3000000)CreationTime = GMTTIMESTAMP '2005-08-24 09:12:09.100'
(0x3000000)ExpirationTime = -1
(0x3000000)Priority = 4
(0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
(0x1000000)MQMD = (
(0x3000000)SourceQueue = 'Q1'
(0x3000000)Transactional = TRUE
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 437
(0x3000000)Format = 'MQHRF2 '
(0x3000000)Version = 2
(0x3000000)Report = 0
(0x3000000)MsgType = 8
(0x3000000)Expiry = -1
(0x3000000)Feedback = 0
(0x3000000)Priority = 4
(0x3000000)Persistence = 1
(0x3000000)MsgId = X'414d5120514d42202020202020202020d2fe0b4320002d01'
(0x3000000)CorrelId = X'000000000000000000000000000000000000000000000000'
(0x3000000)BackoutCount = 0
(0x3000000)ReplyToQ = ' '
(0x3000000)ReplyToQMgr = 'QMB '
(0x3000000)UserIdentifier = 'MUSR_MQADMIN'
(0x3000000)AccountingToken = X'16010515000000797344041ade44cb4317df4ff903000000000000000000000b'
(0x3000000)ApplIdentityData = ' '
(0x3000000)PutApplType = 28
(0x3000000)PutApplName = 'Websphere MQ Client for Java'
(0x3000000)PutDate = DATE '2005-08-24'
(0x3000000)PutTime = GMTTIME '09:12:09.100'
(0x3000000)ApplOriginData = ' '
(0x3000000)GroupId = X'000000000000000000000000000000000000000000000000'
(0x3000000)MsgSeqNumber = 1
(0x3000000)Offset = 0
(0x3000000)MsgFlags = 0
(0x3000000)OriginalLength = -1
)
(0x1000000)MQRFH2 = (
(0x3000000)Version = 2
(0x3000000)Format = 'MQSTR '
(0x3000000)Encoding = 273
(0x3000000)CodedCharSetId = 1208
(0x3000000)Flags = 0
(0x3000000)NameValueCCSID = 1208
(0x1000000)mcd = (
(0x1000000)Msd = (
(0x2000000) = 'jms_text'
)
)
(0x1000000)jms = (
(0x1000000)Dst = (
(0x2000000) = 'queue://QMB/Q1?expiry=0&priority=4&persistence=2'
)
(0x1000000)Tms = (
(0x2000000) = '1124874729080'
)
(0x1000000)Dlv = (
(0x2000000) = '2'
)
)
)
(0x1000000)BLOB = (
(0x3000000)UnknownParserName = 'jms_text'
(0x3000000)BLOB = X'544f3d6a6d733a2f71756575653f64657374696e6174696f6e3d6a6d732f4947464855422f494746485542486f73745753526573706f6e736526636f6e6e656374696f6e466163746f72793d6a6d732f4947464855422f534f41504a4d53466163746f7279202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020414354494f4e3d53686f774352495343726564697420202020202020202020202020202020202020202020202020202044455354494e4154494f4e203d6a6d733a2f71756575653f64657374696e6174696f6e3d6a6d732f4352575353686f774352495343726564697420202020202020202020202020202020202020'
)
)
Back to top
View user's profile Send private message
know_ashu
PostPosted: Wed Aug 24, 2005 1:17 am    Post subject: and client is simple java program Reply with quote

Novice

Joined: 25 Jun 2005
Posts: 22

I am using WMQI 2.1 and my client is simple java client. Sending message to the queue as below:

QueueConnectionFactory qcf = createQueueConnectionFactory();
qc = qcf.createQueueConnection();
qs = createQueueSession(qc);
q = getQueue(sendingQueueName);
qSender = qs.createSender(q);
javax.jms.TextMessage tm = qs.createTextMessage();
tm.setText(messageString);
Back to top
View user's profile Send private message
javaforvivek
PostPosted: Wed Aug 24, 2005 1:50 am    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

know_ashu wrote:
Quote:
I am using WMQI 2.1 and my client is simple java client.

But form your code:
Code:

javax.jms.TextMessage tm = qs.createTextMessage();
tm.setText(messageString);

It seems that you are using JMS client.
Also, I have tried something on my WBIMB, but I hope that it may work on WMQI as well.

I also assume from your trace, that in your MQInput Node you have set domain = BLOB.

Now, from your ESQL:
Code:

DECLARE MSG CHARACTER;
SET MSG = CAST(InputBody AS CHARACTER);
SET Environment.Variable.Msg = MSG;


I see that you first want to get the body of your message in variable MSG.
But the given casting will not work so well here.
I tried with this code:
Code:

DECLARE blobMSG BLOB InputRoot.BLOB.BLOB;
DECLARE MSG CHARACTER CAST(blobMSG AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);
SET Environment.Variable.Msg = MSG;


The
You can try this code, but remember the two basic differences between your environment and mine.:
1) I am using WBIMB whereas you are using WMQI2.1
2) I have used RFHUtil to put message on input queue, whereas you are using java-jms client.

Also I have assumed that you have set domain = BLOB in your MQInputNode.

Again, I have NOT tried rest of your code, because it is evident from your code that unless you get character string in your MSG variable, you can't go further. Also, if you want your OutputRoot to contain data from DB query and NOT from InputRoot, then remove
Code:
OutputRoot = InputRoot
from your code.
Do let me know the outcome of this suggestion.
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
know_ashu
PostPosted: Wed Aug 24, 2005 2:57 am    Post subject: worked Reply with quote

Novice

Joined: 25 Jun 2005
Posts: 22

It worked ... GREAT.-
THAKS for your help.
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 » Not getting InputBody in compute node.
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.