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 » Carriage Return /Line Feed

Post new topic  Reply to topic
 Carriage Return /Line Feed « View previous topic :: View next topic » 
Author Message
mustang
PostPosted: Mon Jan 08, 2007 12:21 pm    Post subject: Carriage Return /Line Feed Reply with quote

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
View user's profile Send private message
mvarghese
PostPosted: Mon Jan 08, 2007 11:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 09, 2007 3:58 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mustang
PostPosted: Tue Jan 09, 2007 8:50 am    Post subject: Reply with quote

Acolyte

Joined: 07 Feb 2006
Posts: 72

Thanks!!!!!!!!!!!! All three suggestions (ESQL, Java and Message Domain) were all extremely useful.
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 » Carriage Return /Line Feed
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.