|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL Trim function |
« View previous topic :: View next topic » |
Author |
Message
|
pottas |
Posted: Mon Jan 23, 2006 9:20 pm Post subject: ESQL Trim function |
|
|
 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 |
|
 |
pottas |
Posted: Tue Feb 14, 2006 4:18 am Post subject: |
|
|
 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 |
|
 |
pottas |
Posted: Mon May 29, 2006 4:18 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|