what is the escape sequence in datastage 7.5.1?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Jagan617
Participant
Posts: 42
Joined: Thu Jun 05, 2008 7:37 pm

what is the escape sequence in datastage 7.5.1?

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Jagan617
Participant
Posts: 42
Joined: Thu Jun 05, 2008 7:37 pm

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

Post by Jagan617 »

trim(col1,' " ',"A") is not working.....can anyone give me the correct syntax
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Please define "not working" as that is the single most unhelpful thing people can say when they have a problem. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Jagan617
Participant
Posts: 42
Joined: Thu Jun 05, 2008 7:37 pm

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

Post 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....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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)
-craig

"You can never have too many knives" -- Logan Nine Fingers
Jagan617
Participant
Posts: 42
Joined: Thu Jun 05, 2008 7:37 pm

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

Post 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)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply