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 » CorrelID BLOB conversion...

Post new topic  Reply to topic
 CorrelID BLOB conversion... « View previous topic :: View next topic » 
Author Message
waugh
PostPosted: Mon Mar 08, 2004 5:08 pm    Post subject: CorrelID BLOB conversion... Reply with quote

Master

Joined: 19 Feb 2004
Posts: 225

Hello Guys,

i am using following when i set MQMD header in ESQL..

SET OutputRoot.MQMD.CorrelId = CAST((InputRoot.XML.ReservationFindWindowsNegativeAck.MessageId) AS BLOB CCSID 437);

i am getting length did not match exception,
Length of parser field name 'CorrelId' was '10'. It should be '24'.

1) how do i convert length in ESQL?

also at recieving end, there's a C program which now looks for a 10 char. string in correllationId when it performs get.

2) how do i convert a string in C (correlID) to a BLOB and also get the correlID length right?

Thanks In Advance
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Mar 08, 2004 7:59 pm    Post subject: Reply with quote

Jedi

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

You can't cast the CorrelID (or the MessageID) using a CCSID. These fields are BYTE fields, and as such, do NOT convert to characters.

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
Eyal_Pu
PostPosted: Tue Mar 09, 2004 6:57 am    Post subject: try the following Reply with quote

Newbie

Joined: 05 Nov 2003
Posts: 4

if the messageid you want to convert is 48 chars which ontain the msgid (in hex form), just to
MQMD.MsgId = cast(messageid as blob);

if you converted them into chars, and it contains 24 chars, then you can do
MQMD.MsgId = cast(messageid as blob ccsid 850)

ccsid 850 can help you convert from blob to char and in reverse.
Back to top
View user's profile Send private message MSN Messenger
kirani
PostPosted: Tue Mar 09, 2004 7:00 pm    Post subject: Reply with quote

Jedi Knight

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

Waugh,

You need to manually append rest of the CHAR to your CorrelID. Let's say your input field InputRoot.XML.ReservationFindWindowsNegativeAck.MessageId always have 10 char string, then you can use code similar to following to create 24 Byte CorrelID.

Code:

DECLARE CORLID BLOB;
SET CORLID = CAST (InputRoot.XML.ReservationFindWindowsNegativeAck.MessageId AS BLOB CCSID InputRoot.MQMD.CodedCharSetId);
SET OutputRoot.MQMD.CorrelId = CORLID || X'0000000000000000000000000000';


Depending your your requirement you can change the padding HEX to X'40' to get SPACES.
_________________
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 » CorrelID BLOB conversion...
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.