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 » MQMD parse

Post new topic  Reply to topic
 MQMD parse « View previous topic :: View next topic » 
Author Message
alerajeshh
PostPosted: Wed Oct 02, 2013 5:36 am    Post subject: MQMD parse Reply with quote

Acolyte

Joined: 19 Aug 2013
Posts: 55

Hi am trying to propagate an XML from Compute node by assigning msg id and correl id ,

but it is giving an error like "Exception whilst writing field named"

MQ_Input -- >COmpute -- >MQOutput

COmpute node am setting Msg id and correlid in output root.

SET OutputRoot.Properties=InputRoot.Properties;
SET OutputRoot.MQMD.CorrelId=
SET OutputRoot.MQMD.MsgId=

please guide me..Gone thorugh infocenter..but unable to find out the cause
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 02, 2013 5:42 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Are you copying the MQMD before you set the values?

What are you setting the values to? The posted code doesn't show anything.

What is the error exactly? Don't say "it's something like", be precise.

What have you alreaady tried after your research in the InfoCenter?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
alerajeshh
PostPosted: Wed Oct 02, 2013 5:51 am    Post subject: Reply with quote

Acolyte

Joined: 19 Aug 2013
Posts: 55

iam setting the MQMD values msg id and correl id by my own using the XML input data

SET OutputRoot.MQMD.CorrelId=instanceRef.agentUUID;
SET OutputRoot.MQMD.MsgId=instanceRef.agentInstanceId

where agent UUID is 067e6162-3b6f-4ae2-a171-2470b63dff00
and msg id is 0

it is giving an exception "Wrong type exception"
Back to top
View user's profile Send private message
alerajeshh
PostPosted: Wed Oct 02, 2013 5:54 am    Post subject: Reply with quote

Acolyte

Joined: 19 Aug 2013
Posts: 55

here is the exceptionList

ExceptionList
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\MessageServices\ImbDataFlowNode.cpp
Line:INTEGER:1153
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmMQInputNode
Name:CHARACTER:Sample#FCMComposite_1_1
Label:CHARACTER:Sample.MQ Input
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\SQLNodeLibrary\ImbComputeNode.cpp
Line:INTEGER:497
Function:CHARACTER:ImbComputeNode::evaluate
Type:CHARACTER:ComIbmComputeNode
Name:CHARACTER:Sample#FCMComposite_1_3
Label:CHARACTER:Sample.Compute
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\ImbRdl\ImbRdlStatementGroup.cpp
Line:INTEGER:666
Function:CHARACTER:SqlStatementGroup::execute
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2488
Text:CHARACTER:Error detected, rethrowing
Insert
Type:INTEGER:5
Text:CHARACTER:.Sample_Compute.Main
Insert
Type:INTEGER:5
Text:CHARACTER:15.17
Insert
Type:INTEGER:5
Text:CHARACTER:PROPAGATE FINALIZE DEFAULT DELETE DEFAULT;
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\MQLibrary\linklib\ImbMqOutputNode.cpp
Line:INTEGER:877
Function:CHARACTER:ImbMqOutputNode::evaluate
Type:CHARACTER:ComIbmMQOutputNode
Name:CHARACTER:Sample#FCMComposite_1_2
Label:CHARACTER:Sample.MQ Output
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
ParserException
File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\MQLibrary\linklib\ImbMqmdParser.cpp
Line:INTEGER:1094
Function:CHARACTER:ImbMqmdParser::writeMqmd
Type:CHARACTER:ComIbmMQInputNode
Name:CHARACTER:Sample#FCMComposite_1_1
Label:CHARACTER:Sample.MQ Input
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:2
Number:INTEGER:5912
Text:CHARACTER:Exception whilst writing field named
Insert
Type:INTEGER:5
Text:CHARACTER:MQMD
Insert
Type:INTEGER:5
Text:CHARACTER:MsgId
Insert
Type:INTEGER:5
Text:CHARACTER:0
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\CommonServices\ImbValue.cpp
Line:INTEGER:983
Function:CHARACTER:ImbValue::typeError
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2328
Text:CHARACTER:Wrong type exception
Insert
Type:INTEGER:5
Text:CHARACTER:CHARACTER
Insert
Type:INTEGER:5
Text:CHARACTER:BLOB
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 02, 2013 5:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

alerajeshh wrote:
it is giving an exception "Wrong type exception"


Because those values are not the right type for those fields.

When you were looking at the InfoCenter, did you notice this section? The id fields are byte arrays and neither a string nor an integer can be cast to them.

Moving to the larger issue, it's a very, very, very bad idea to use business data as an id. Especially when the data yields an id of 0! Seriously! That's going to be a unique id for the queue manager to use? There are very few designs where business data in an id is a good idea, and it's more likely a clue that you're engaged in a bad idea (like trying to read messages using agentInstanceId as a key).

What you're trying won't work as coded. If you fix the code so that it works, it will make your medium term problems worse.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Oct 02, 2013 6:41 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Reading the ExceptionList is not the best way to diagnose message flow problems. A User Trace ( which is not the same thing as a Trace node ) will contain the full text of the error, with all of the message parameters filled in.

Check this topic for more details:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/an01310_.htm
_________________
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
alerajeshh
PostPosted: Wed Oct 02, 2013 10:34 am    Post subject: Reply with quote

Acolyte

Joined: 19 Aug 2013
Posts: 55

DECLARE msgId CHAR instanceRef.agentInstanceId; ('0')
Declare correlId CHAR instanceRef.agentUUID; ('067e61623b6f4ae2a1712470b63dff00')
SET msgId = REPLICATE('0',(48-LENGTH(msgId))) || msgId ;
SET correlId = REPLICATE('0',(48-LENGTH(correlId))) || correlId;
SET OutputRoot.MQMD.MsgId= CAST(msgId AS BLOB);
SET OutputRoot.MQMD.CorrelId= CAST(correlId AS BLOB);


it works...Now i can pass the both msg id and correlation id ...

am appending the '0' before the msg id and correlation id to make it 48 char length...
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Wed Oct 02, 2013 10:52 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

Vitor wrote:
What you're trying won't work as coded. If you fix the code so that it works, it will make your medium term problems worse.


You have been warned.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 02, 2013 11:17 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

joebuckeye wrote:
Vitor wrote:
What you're trying won't work as coded. If you fix the code so that it works, it will make your medium term problems worse.


You have been warned.


I tried. Some people can't be helped.....

@alerajeshh - I reserve the right to say "I told you so" when you post about this again in a few months / weeks / days.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
alerajeshh
PostPosted: Wed Oct 09, 2013 10:54 am    Post subject: Reply with quote

Acolyte

Joined: 19 Aug 2013
Posts: 55

Hi,
I want to send Correlation Id of 32char ( 067e61623b6f4ae2a1712470b63dff00 )..

Iam able to send correlation Id of 24char...

I know that MQMD correl id is 24Bytes..so we cannot send length more than 24 char... but i just wanna know is der any possibility ?

help me,,,

Declare correlId CHARACTER instanceRef.agentUUID;
SET OutputRoot.MQMD.CorrelId= CAST(correlId AS BLOB CCSID 437);

here is my code for correlId (instanceRef.agentUUID is pointing to "067e61623b6f4ae2a1712470b63dff00 ")..
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Oct 09, 2013 11:16 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

alerajeshh wrote:

I know that MQMD correl id is 24Bytes..so we cannot send length more than 24 char... but i just wanna know is der any possibility ?

help me,,,


The MsgId and CorrelId are fixed length fields in the MQMD. Actually all the elements of the MQMD are fixed length. There is no possibility of using Id's longer than 24MQBytes. Unless you want to raise an RFE to try to get IBM to change the length of these fields just for you whilst remembering that doing so would make your version of MQ incompatible with every other one on the planet.

You have some alternatives to consider
1) Truncate your 32char field removing the bits that can never change
2) Change the way you generate the ID so that it fits into the available space
3) Consider using a name/value pair in the RFHUTIL Header. These can handle variable length fields and ones longer than 24 MQBytes in length.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Oct 09, 2013 11:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Since you are using a UUID, its an easy task to trim : just remove the 8 bytes that belong to the MAC address. 32 minus 8 is 24.
_________________
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
alerajeshh
PostPosted: Wed Oct 09, 2013 11:25 am    Post subject: Reply with quote

Acolyte

Joined: 19 Aug 2013
Posts: 55

Iam looking for other options other than truncating the UUID..
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Oct 09, 2013 11:28 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

alerajeshh wrote:
Iam looking for other options other than truncating the UUID..


So sorry to tell you that you cannot store 32 bytes of data in a 24 byte field.

What's wrong with ditching the MAC address ? Your number will still be unique.
_________________
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
fjb_saper
PostPosted: Wed Oct 09, 2013 11:30 pm    Post subject: Reply with quote

Grand High Poobah

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

Quote:
here is my code for correlId (instanceRef.agentUUID is pointing to "067e61623b6f4ae2a1712470b63dff00 ")..

Looks to me like a hex representation of a 16 byte array.... Plenty of space to get to 24 bytes...
_________________
MQ & Broker admin
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 » MQMD parse
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.