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 » ESQL Trim function

Post new topic  Reply to topic
 ESQL Trim function « View previous topic :: View next topic » 
Author Message
pottas
PostPosted: Mon Jan 23, 2006 9:20 pm    Post subject: ESQL Trim function Reply with quote

Disciple

Joined: 27 Oct 2005
Posts: 185
Location: South Africa

Guys,
I am in the process of migrating 2.1 message Sets and Message Flows to WBI version 6. I am experiencing some problems with the following 2.1 piece of ESQL:

DECLARE Msg BLOB;
SET Msg = TRIM(trailing x'0D' from InputRoot."BLOB"."BLOB");
SET Msg = TRIM(trailing x'0A' from Msg);
SET Msg = TRIM(trailing x'0D' from Msg);
SET Msg = TRIM(trailing x'20' from Msg);

It seems like it doesn't like the way I use the trim function when passing through a BLOB, even though this piece of code worked perfectly in Integrator 2.1.
Back to top
View user's profile Send private message
pottas
PostPosted: Tue Feb 14, 2006 4:18 am    Post subject: Reply with quote

Disciple

Joined: 27 Oct 2005
Posts: 185
Location: South Africa

OK, maybe I've posted this problem on the wrong forum...
Moderators, can you please move this to the 'WMQI Support' forum... thanks in advance.
Also, if there's anyone out there that can tell me if this is a bug so that I can log it with IBM - because as I stated, the TRIM function works perfectly fine in 2.1.
Back to top
View user's profile Send private message
pottas
PostPosted: Mon May 29, 2006 4:18 am    Post subject: Reply with quote

Disciple

Joined: 27 Oct 2005
Posts: 185
Location: South Africa

...well, this post have been hanging around for a couple of months. And for informational purposes, I'll answer my own question on the 'ESQL Trim function'...

...this is how we solved our problem:
Code:

DECLARE MsgBlob BLOB;
DECLARE Msg CHAR CAST(InputRoot.BLOB.BLOB AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);
DECLARE CR CHAR CAST(CAST(x'0a' AS BLOB CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);
DECLARE LF CHAR CAST(CAST(x'0d' AS BLOB CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);
DECLARE SP CHAR ' ';

  SET Msg = TRIM(TRAILING LF FROM Msg);
  SET Msg = TRIM(TRAILING CR FROM Msg);
  SET Msg = TRIM(TRAILING LF FROM Msg);
  SET Msg = TRIM(TRAILING SP FROM Msg);

  SET MsgBlob = CAST(Msg AS BLOB CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


Hopefully someone out there will encounter the same kind of problem... and find this helpful.

pottas
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 » ESQL Trim function
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.