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 IndexWebSphere Message Broker (ACE) SupportRemove CRLF (0d0a) from XML message

Post new topicReply to topic
Remove CRLF (0d0a) from XML message View previous topic :: View next topic
Author Message
Gama
PostPosted: Mon Mar 23, 2009 9:50 am Post subject: Remove CRLF (0d0a) from XML message Reply with quote

Centurion

Joined: 11 Jan 2005
Posts: 103
Location: Portugal

Hello all,

I have some message on Environment tree that have \r\n on "Environment.Variables.DATA.SUM_N3[2].DOMICILIO”.

DECLARE varBlob BLOB;
DECLARE domicilio CHARACTER;
SET varBlob = CAST(Environment.Variables.DATA.SUM_N3[2].DOMICILIO AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
set domicilio = cast(varBlob as CHARACTER CCSID InputRoot.Properties.CodedCharSetId);

The result is an BLOB and then:

set varBlob = replace(varBlob, X'0d0a');

Is that possible make an CAST to Environment.Variables.DATA?
Because is possible that the client include the x’0d0a’ on other field.

Message example:
Environment
Variables
DATA
SUM_N3
ID = 169019.0
DOMICILIO = RUA DE CONCHARINHA, Nº 256 - APARTADO 11
POBLACION = S. PAIO DE OLEIROS
FACT = 2009-03-20 17:00:47.000
SUM_N3
ID = 169020.0
DESTINO = JOSÉ NEVES & CIA, LDA
DOMICILIO = AVD SANTO TIRSO-PRAZINS (STO TIRSO) \r\nAPARTADO 4040
FACT = 2009-03-20 17:00:47.000
SUM_N3
ID = 169021.0
.
.
.

Thanks.

Best Regards
Gama


Last edited by Gama on Tue Mar 24, 2009 6:17 am; edited 2 times in total
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Mar 23, 2009 2:11 pm Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

What are you trying to do?
Why do you want to remove the \r\n?
Back to top
View user's profile Send private message
Gama
PostPosted: Mon Mar 23, 2009 2:36 pm Post subject: Reply with quote

Centurion

Joined: 11 Jan 2005
Posts: 103
Location: Portugal

kimbert wrote:
What are you trying to do?
Why do you want to remove the \r\n?


Whe need to remove 0d0a because the informix verssion does not allow those characters.
Back to top
View user's profile Send private message
Gama
PostPosted: Tue Mar 24, 2009 2:27 pm Post subject: Reply with quote

Centurion

Joined: 11 Jan 2005
Posts: 103
Location: Portugal

Any suggestion are apreciated.... Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 24, 2009 2:33 pm Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You should be able to ASBITSTREAM your Environment.Variables.DATA, assuming it has a parser associated with it (this depends entirely on how you populated it).

Otherwise you will have to loop over all the children individually and either ASBITSTREAM or cast them to BLOB or just do the replace on them as character values anyway.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportRemove CRLF (0d0a) from XML message
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.