Author |
Message
|
Gama |
Posted: Mon Mar 23, 2009 9:50 am Post subject: Remove CRLF (0d0a) from XML message |
|
|
 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 |
|
 |
kimbert |
Posted: Mon Mar 23, 2009 2:11 pm Post subject: |
|
|
 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 |
|
 |
Gama |
Posted: Mon Mar 23, 2009 2:36 pm Post subject: |
|
|
 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 |
|
 |
Gama |
Posted: Tue Mar 24, 2009 2:27 pm Post subject: |
|
|
 Centurion
Joined: 11 Jan 2005 Posts: 103 Location: Portugal
|
Any suggestion are apreciated.... Thanks. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 24, 2009 2:33 pm Post subject: |
|
|
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 |
|
 |
|