Posted: Thu Jul 03, 2003 8:58 pm Post subject: Information wanted regarding CRLF
Voyager
Joined: 04 Mar 2003 Posts: 86
Question:
I need to locate the position of CRLF in a string.
The POSITION function does not return it and SUBSTRING returns it as space ' '.
EXAMPLE:
-----------
In the following xml message :
<AccountNumberAtDeliveryInstitution>803-3093-455</AccountNumberAtDeliveryInstitution><AccountWithInstitutionAccountNumber>44444</AccountWithInstitutionAccountNumber><AccountWithInstitutionBIC>BBBBBBBB</AccountWithInstitutionBIC><AccountWithInstitutionNameAddress>44 St.
London
Line3
Line4</AccountWithInstitutionNameAddress><........
For the xml portion from the above message:
<AccountWithInstitutionNameAddress>44 St.
London
Line3
Line4</AccountWithInstitutionNameAddress>
we have written the following ESQL code to map :
Set Temp_Crlf = '
';
POSITION(Temp_Crlf in InputBody.TMESSAGE.TMDIRECTIVE.AccountWithInstitutionNameAddress)
returns 0 ;
and
SUSBTRING(InputBody.TMESSAGE.TMDIRECTIVE.AccountWithInstitutionNameAddressFROM 14 FOR 1 )
returns ' ';
But this particular piece of code is not serving our purpose. Please let me how to handle this scenario.
Kindly advise and suggest.
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
Have you tried reading this message as BLOB and the use of POSITION function to determine the position of <CR><LF> chars?
You might want to look at this thread also,
http://www.mqseries.net/phpBB2/viewtopic.php?t=9681 _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
Posted: Fri Jul 04, 2003 6:30 am Post subject: Information wanted regarding CRLF
Voyager
Joined: 04 Mar 2003 Posts: 86
I need to read the message as XML as I have to navigate through the different tags.
Also by reading it as BLOB , POSITION does return the position of CRLF, but considers it as space ie:- if it finds a space before CRLF it returns that position.
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