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 » Saving MQMD.MsgId within an MRM.

Post new topic  Reply to topic
 Saving MQMD.MsgId within an MRM. « View previous topic :: View next topic » 
Author Message
DELLIPIZ
PostPosted: Tue Dec 21, 2004 11:51 am    Post subject: Saving MQMD.MsgId within an MRM. Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

Hi,

I have a field MESSAGEID in my MRM that I want to use to store the MQMD.MsgID. Then in another seperate flow, I want to set my MQMD.CorrelId to that MESSAGID.

When I try the first part with:
SET OutputRoot.MRM.MESSAGEID = InputRoot.MQMD.MsgId;

I get the following error:
CWF Internal Error</DESCRIPTN><DETAIL><INSERTS>1=Invalid logical type for string physical type., 2=MESSAGEID, 3=2

Any suggestions for this????

Thanks!

-Lori
Back to top
View user's profile Send private message
JT
PostPosted: Tue Dec 21, 2004 12:17 pm    Post subject: Reply with quote

Padawan

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

What is the type characteristic of the MESSAGEID element, i.e. string, short, etc..?

The MQMD.MsgId is binary, so depending on the type of your MRM element, you may have to perform a CAST to move it to MRM.MESSAGEID.
Back to top
View user's profile Send private message
JT
PostPosted: Tue Dec 21, 2004 12:19 pm    Post subject: Reply with quote

Padawan

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

Quote:
1=Invalid logical type for string physical type

Just noticed the first Insert. MESSAGEID is defined as a string, so you'll have to perform the CAST.
Back to top
View user's profile Send private message
DELLIPIZ
PostPosted: Tue Dec 21, 2004 12:37 pm    Post subject: Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

Thanks!

So I tried this:

SET OutputRoot.MRM.MESSAGEID = CAST(InputRoot.MQMD.MsgId as CHAR);

I have MESSAGEID defined as STRING 48. Since I thought that that was the max length of the MQMD.MsgID.

However, I am getting the following error:

The field length was greater than maxLen</DESCRIPTN><DETAIL><INSERTS>1=MESSAGEID, 2=REQUEST_INFO_MSG, 3=48, 4=51

What should I define that field as? Why is it 51 now?

Also, after I get that working and I go to move that MESSAGEID to the MQMD.CorrelId in another flow, is the command I need:

SET OutputRoot.MQMD.CorrelId = CAST(OutputRoot.MRM.MESSAGEID as BLOB);

???

Thanks again!

-Lori
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 21, 2004 12:37 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

But Message IDs and Correlation Ids are BINARY data, not Strings.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JT
PostPosted: Tue Dec 21, 2004 12:48 pm    Post subject: Reply with quote

Padawan

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

Quote:
Why is it 51 now?

The CAST encapsulated the msgid value with x'' (48 + 3 = 51), so try this:

Code:
SET OutputRoot.MRM.MESSAGEID = SUBSTRING(CAST(InputRoot.MQMD.MsgId as CHAR) FROM 3 for 48);

Quote:
Also, after I get that working and I go to move that MESSAGEID to the MQMD.CorrelId in another flow, is the command I need:

SET OutputRoot.MQMD.CorrelId = CAST(OutputRoot.MRM.MESSAGEID as BLOB);

Not quite. Since you'll be setting the correlation id in another message flow, and depending upon your input and output message structures, you may want to do this:

Quote:
SET OutputRoot.MQMD.CorrelId = CAST(InputRoot.MRM.MESSAGEID as BLOB);
Back to top
View user's profile Send private message
DELLIPIZ
PostPosted: Tue Dec 21, 2004 12:49 pm    Post subject: Reply with quote

Acolyte

Joined: 08 Oct 2003
Posts: 70

It was suggested to cast it as a string. That won't work?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 21, 2004 12:53 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It won't work to treat message Ids and correlation Ids as string data, because they can contain non-printable characters, including potentially binary 0.

This can hose up any program that is not expecting them.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Dec 21, 2004 12:57 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

If you are defining your field as CHAR then make sure your field length is greater than or equal to 48 bytes long. If you want to store X'' then it should be 51 bytes long.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Saving MQMD.MsgId within an MRM.
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.