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 » can't read the XML message

Post new topic  Reply to topic
 can't read the XML message « View previous topic :: View next topic » 
Author Message
mqsha
PostPosted: Tue Jan 24, 2006 3:04 pm    Post subject: can't read the XML message Reply with quote

Novice

Joined: 10 Jun 2004
Posts: 17

Hi,

I am using INPUTnode -> Filter Node-> Output Node
|--> Output Node(Error Queue)

I am using message domain as BLOB, messages are getting with XML and String messages .

I am using Correlation iD in the message ,

substring(cast(Root.MQMD.CorrelId as CHARACTER ccsid 437) from 1 for 5) >= 80000 AND substring(cast(Root.MQMD.CorrelId as CHARACTER ccsid 437) from 1 for 5) <= 84999

I want the message if the correclationID is between 80000 and 84999, no matter whether its XML or string message.

Can any one suggest me what i am doing wrong.

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 24, 2006 3:40 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You mean, besides trying to use the defined-as-binary-only correlation ID to hold string data?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JT
PostPosted: Tue Jan 24, 2006 4:53 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

You can't make a greater-than (<) and equal to (=) comparison between a string and a numeric value. They have to be on the same playing field.
Back to top
View user's profile Send private message
mqsha
PostPosted: Tue Jan 24, 2006 6:26 pm    Post subject: Reply with quote

Novice

Joined: 10 Jun 2004
Posts: 17

yes.. how can i convert Correlation ID (HEX) to Integer. because we are using JMS ,correlatioID is like integer.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 24, 2006 6:32 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

JT wrote:
You can't make a greater-than (<) and equal to (=) comparison between a string and a numeric value. They have to be on the same playing field.


I suspect, not having double-checked, that this is a case where an implicit conversion takes place. It's definitely legal (I checked) to use <= and >= with CHAR operands.

Regardless, it's likely that the original correlation ID is being set to a value in Unicode - which is being recorded as byte values with no CCSID - and then mqsha is trying to convert that to CCSID 437.

mqsha - DO NOT USE CORRELATION ID FOR THIS.

Use a JMS Property, maybe. You can get at JMS properties from within WMB/WBIMB/WMQI in the MQRFH2 header.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 25, 2006 1:52 pm    Post subject: Reply with quote

Grand High Poobah

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

mqsha wrote:
yes.. how can i convert Correlation ID (HEX) to Integer. because we are using JMS ,correlatioID is like integer.


WRONG whether you are using JMS or any other API the Correlation id is always a byte array and not a number. JMS may give you a char representation of the byte array but this does not change anything to the underlying structure.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
hal
PostPosted: Mon Jan 30, 2006 3:08 pm    Post subject: Reply with quote

Acolyte

Joined: 07 Dec 2005
Posts: 67
Location: New York City, New York

Not sure why the correlation id field is being used for this purpose, but in ESQL you can cast a hex/BLOB value to an integer and then compare the result to other integers. For example, in a filter node:

DECLARE correlidChar CHARACTER;
SET correlidChar = substring(
CAST(Root.MQMD.CorrelId AS CHARACTER ccsid 437)
FROM 1 FOR 5);

DECLARE correlidInt INTEGER;
SET correlidInt = CAST(correlidChar AS INTEGER);

IF (correlidInt >= 80000) AND (correlidInt <= 84999) THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » can't read the XML message
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.