Page 1 of 1

what is the escape sequence in datastage 7.5.1?

Posted: Thu May 28, 2009 4:51 am
by Jagan617
I want to remove the quotes in a string using trim function, so can anyone suggest me what is the escape sequence in the 7.5.1 version.

Posted: Thu May 28, 2009 6:46 am
by chulett
Not sure why you'd need an 'escape sequence' for a trim... you should be able to call Trim() with the character surrounded by the 'other' quotes, i.e. "'" or '"' for example. Is that what you needed?

trim(col1,' " ',"A")

Posted: Thu May 28, 2009 9:13 am
by Jagan617
trim(col1,' " ',"A") is not working.....can anyone give me the correct syntax

Posted: Thu May 28, 2009 9:23 am
by DSguru2B
Is it single quote or double quotes that you need to remove? If former then Craig has given you the quote wrapped in double quotes. Use that. IF latter then make sure your quote character is set to '000' as the double quotes should be visible when you hit view data, if thats what you want. If not then please provide sample data.
For correct syntax, please refer to DataStage Designer help.

Posted: Thu May 28, 2009 9:39 am
by chulett
Please define "not working" as that is the single most unhelpful thing people can say when they have a problem. :?

Re: trim(col1,' " ',"A") ..need to remove dou

Posted: Thu May 28, 2009 9:09 pm
by Jagan617
Jagan617 wrote:trim(col1,' " ',"A") is not working.....can anyone give me the correct syntax
.

I have to remove the double quotes in the col1 where col1 is "Good Morning". If i use the above trim function, i have to get Good Morning with out quotes. Even i used 000 in quote character to supress the quotes but still i am getting quotes in the output. Can any one help me....

Posted: Thu May 28, 2009 9:25 pm
by chulett
What 'output'? Where are you writing this, to a sequential file? I'm wondering if a) they are even really there and b) if something you are doing simply puts them back in the output, hence the question about your actual target. Or is that (a target sequential file) where you are using 000 for the quote character?

If the problem is really in the Trim() why not try Convert() and see if you have better luck?

Code: Select all

Convert('"','',col1)

Thannks....its solved ...i have used convert instead of trim

Posted: Fri May 29, 2009 10:18 am
by Jagan617
chulett wrote:What 'output'? Where are you writing this, to a sequential file? I'm wondering if a) they are even really there and b) if something you are doing simply puts them back in the output, hence the question about your actual target. Or is that (a target sequential file) where you are using 000 for the quote character?

If the problem is really in the Trim() why not try Convert() and see if you have better luck?

Code: Select all

Convert('"','',col1)

Posted: Fri May 29, 2009 10:49 am
by chulett
So... we're good? Switching to convert worked for you? Ah, yes - "Thanks....its solved ...i have used convert instead of trim" - messages in subjects only show up when someone replies - something to keep in mind.

Please mark the thread as Resolved using the button at the top of the screen! :D