Posted: Thu Jul 10, 2003 2:22 am Post subject: SOLVED---> CRLF representation in ESQL
Newbie
Joined: 28 Feb 2003 Posts: 5 Location: Pune, India
Hi,
We were facing the problem of identifying CRLF in a srting using POSITION function in ESQL.
This is a solution that works
The Input message set used was XML and the output SWIFT
************************************************************
DECLARE intPosit INTEGER;
DECLARE strInput, strCRLF CHARACTER;
SET strCRLF = '
' ;
SET strInput = "InputBody"."Tag1"."Child1";
SET intPosit = POSITION(strCRLF IN strInput);
SET OutputRoot.XML.Test.Test3 = SUBSTRING("InputBody"."Tag1"."Child1" FROM 1 FOR intPosit-1);
SET OutputRoot.XML.Test.Test4 = SUBSTRING"InputBody"."Tag1"."Child1" FROM intPosit+1);
Here CRLF can be written by "pressing" Ctrl + Enter (it appears as in above snippet) and enclosing the same within quotes.
It should be noted that when debugging in the control center the CRLF entered in the code as described above is somehow not recognized as a result of which the POSITION function returns a NULL value, so the code does not appear to work and the messages fail at the compute node.
Many thanks to all who have replied to the CRLF ESQL queries posted here. Its a pleasure to share problems as well as solutions with you _________________ Jayanti Vaidya,
Satyam Computer Services Ltd.
"Tat Tvam Asi - Thou Art That" - The Upanishad
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