|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Carriage Return /Line Feed |
« View previous topic :: View next topic » |
Author |
Message
|
mustang |
Posted: Mon Jan 08, 2007 12:21 pm Post subject: Carriage Return /Line Feed |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 72
|
Using WMB6, we are trying to identify special characters such as carriage returns and line feeds to use in ESQL String functions (Substring, Replace, etc.).
We first tried using the replace function. No matter what we try, the message always displays the \n in the debug display for the element we are applying the function to (the carriage returns and/or line feeds are not being replaced). Here is what we have tried so far:
Set target.ExceptionText = Replace(target.ExceptionText, '\n', '');
Declare CR char CAST(X'000D' as CHAR ccsid 1208);
Set target.ExceptionText = Replace(target.ExceptionText, CR, '');
Set CR = CAST(X'0013' as CHAR ccsid 1208);
Set target.ExceptionText = Replace(target.ExceptionText, CR, '');
Declare LF char CAST(X'000A' as CHAR ccsid 1208);
Set target.ExceptionText = Replace(target.ExceptionText, LF, '');
Set LF = CAST(X'0010' as CHAR ccsid 1208);
Set target.ExceptionText = Replace(target.ExceptionText, LF, '');
Any help would be much appreciated.
Thanks!!!!!!!!!!!!!!!!! |
|
Back to top |
|
 |
mvarghese |
Posted: Mon Jan 08, 2007 11:59 pm Post subject: |
|
|
Centurion
Joined: 27 Sep 2006 Posts: 141
|
--Removing the \r\n coming from Response ..so am Clearing it
DECLARE CR CONSTANT CHAR CAST(X'0D' AS CHAR CCSID 1208);
DECLARE LF CONSTANT CHAR CAST(X'0A' AS CHAR CCSID 1208);
SET RespCode = Environment.Variables.ResponseCode;
SET RespCode = REPLACE(RespCode, CR, '');
SET RespCode = REPLACE(RespCode, LF, ''); _________________ Jain Varghese |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jan 09, 2007 3:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Use a simple java program.
Read the text in with a buffered reader using readline. Write it to a string buffer (buffered writer) using write...
This should suppress any new line info...
However if you are trying to suppress white space in an xml message, may I suggest looking at the XMLNSC parser...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mustang |
Posted: Tue Jan 09, 2007 8:50 am Post subject: |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 72
|
Thanks!!!!!!!!!!!! All three suggestions (ESQL, Java and Message Domain) were all extremely useful. |
|
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
|
|
|
|