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 » Setting de Message_Id in ESQL

Post new topic  Reply to topic
 Setting de Message_Id in ESQL « View previous topic :: View next topic » 
Author Message
jsanchose
PostPosted: Wed Apr 26, 2006 6:42 am    Post subject: Setting de Message_Id in ESQL Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

Hi,

I'm working with Message Brokers.

Could someone please explain how can I set the value of Message_Id in MQMD from a character field.

The type of Message_Id is Hexadecimal.

What type of CAST I need?

Also, to clarify:

If myField = 'IDENT' --> Message_Id would be X'4944454E54'.

Thanks,

Pepe
Back to top
View user's profile Send private message
madi
PostPosted: Wed Apr 26, 2006 7:03 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

I dont think I understand the question, why do u need a cast to set MessaageId

SET OutputRoot.MQMD.MessageId = 'whatever';

--madi
Back to top
View user's profile Send private message
jsanchose
PostPosted: Wed Apr 26, 2006 8:12 am    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

When I assign the value as you say I obtain an exception in node MQOutput.

"Text wrong type exception".

Catalog BIPv500
Severity 3
Number 2328

CHARACTER <--> BLOB

A BLOB is expected but a CHARACTER is received. I Think.
Back to top
View user's profile Send private message
madi
PostPosted: Wed Apr 26, 2006 8:55 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

can u post ur code??

--madi
Back to top
View user's profile Send private message
jsanchose
PostPosted: Wed Apr 26, 2006 9:13 am    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

Of course.

...
CREATE FIELD OutputRoot.MRM.FIN.TEXT_BLOCK.MT103;
DECLARE Swf REFERENCE TO OutputRoot.MRM.FIN.TEXT_BLOCK.MT103;
DECLARE I INTEGER;

-- Campo 20 Obligatorio - Sender's Reference
SET Swf.SW20 = InputBody.EAIWFIJ1.EAIFIJ_REF_MENSAJE;
SET OutputRoot.MQMD.MsgId = Swf.SW20;
...
Back to top
View user's profile Send private message
Vijji
PostPosted: Wed Apr 26, 2006 9:48 am    Post subject: Reply with quote

Voyager

Joined: 30 Aug 2005
Posts: 83

Hi jsanchose,

I was tried this like what madi said previously.I didn't get any error.

r u using xml messageset r what?


Cheers,
vijji.
Back to top
View user's profile Send private message
jsanchose
PostPosted: Wed Apr 26, 2006 10:03 am    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

Here the MessageSet and other porperties.

...
SET OutputRoot.Properties.MessageSet = 'HV0TGUO002001';
SET OutputRoot.Properties.MessageType = 'SwiftEnvelope';
SET OutputRoot.Properties.MessageFormat = 'SWIFT';
...

But have the MQMD type fields dependences to MessageSet?

Thanks for ur interest!.
Back to top
View user's profile Send private message
madi
PostPosted: Wed Apr 26, 2006 10:04 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

i think you read atleast some documentation before posting here!!

Quote:
CREATE FIELD OutputRoot.MRM.FIN.TEXT_BLOCK.MT103;
DECLARE Swf REFERENCE TO OutputRoot.MRM.FIN.TEXT_BLOCK.MT103;
DECLARE I INTEGER;

-- Campo 20 Obligatorio - Sender's Reference
SET Swf.SW20 = InputBody.EAIWFIJ1.EAIFIJ_REF_MENSAJE;
SET OutputRoot.MQMD.MsgId = Swf.SW20;



Code:
CREATE FIELD OutputRoot.MRM.FIN.TEXT_BLOCK.MT103;
DECLARE Swf REFERENCE TO OutputRoot.MRM.FIN.TEXT_BLOCK.MT103;
DECLARE I INTEGER;

-- Campo 20 Obligatorio - Sender's Reference
SET Swf.SW20 = FIELDVALUE(InputBody.EAIWFIJ1.EAIFIJ_REF_MENSAJE);
SET OutputRoot.MQMD.MsgId = FIELDVALUE(Swf.SW20);


Dont expect anyone to help with such basic stuff!!

--madi
Back to top
View user's profile Send private message
jsanchose
PostPosted: Wed Apr 26, 2006 11:45 am    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

Sorry, I was tried this like what madi said previously.I have obtained the same error, maybe a basic stuff for many people but it's a hard problem for me.

Can you help me again?

Best regards.
Back to top
View user's profile Send private message
madi
PostPosted: Wed Apr 26, 2006 12:25 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

post your input message for a better idea

--madi
Back to top
View user's profile Send private message
jsanchose
PostPosted: Wed Apr 26, 2006 12:58 pm    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

That's the question.

With this sentence:

SET OutputRoot.MQMD.MsgId = X'C5C1C96DE3D9C66DD96DD4E3F2F0F2000000000000000000';

The flow run OK.

With this other:

SET OutputRoot.MQMD.MsgId = 'EAI_TRF_R_MT202 ';

The flow ends with exception.

How can I CAST a CHARACTER STRING to an HEXADECIMAL STRING.

I'm sure that it must be easy, but I don't know the answer.


Thanks, tomorow I will read ur reply.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 26, 2006 1:30 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

jsanchose wrote:
How can I CAST a CHARACTER STRING to an HEXADECIMAL STRING.


http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak04860_.htm

Have you considered getting training on this product?

It's not a "HEXADECIMAL STRING", it is as you previously said a "BLOB".

It should have taken you less than an hour to find the answer you needed in the Information Center on your own, if you hadn't been waiting for someone else to tell you.

Even if your English is very bad, and reading it is difficult, it still should have taken you less than an hour to find the answer!
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JT
PostPosted: Thu Apr 27, 2006 11:41 am    Post subject: Reply with quote

Padawan

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

.........and if trolling the Information Center proves too difficult for you, an alternative is to search this forum.

Doing so would have turned up this post: http://www.mqseries.net/phpBB2/viewtopic.php?t=13997
Back to top
View user's profile Send private message
jsanchose
PostPosted: Thu Apr 27, 2006 12:56 pm    Post subject: Reply with quote

Novice

Joined: 26 Apr 2006
Posts: 16

I'm happy.

At end that's the solution:

...
DECLARE WMSGID BLOB;
SET WMSGID = CAST(Swf.SW20 AS BLOB CCSID 850);
SET OutputRoot.MQMD.MsgId = WMSGID || REPLICATE(X'00',24 - LENGTH(WMSGID));
...

Thanks JT.
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 » Setting de Message_Id in ESQL
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.