How to escape double quotes in a transformer?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
MrBlack
Participant
Posts: 125
Joined: Wed Aug 08, 2012 8:57 am

How to escape double quotes in a transformer?

Post by MrBlack »

Simple question, how to do you escape a literal string when concatenating in a transformer? This doesn't work:

Code: Select all

"<doc xmls=\"google.com\" >":DSLink1.col:"</doc>"
As you can see I have a literal string that uses double quotes and I can't remember what the character is that escapes those out so I can continue with the concatenation.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You don't need to escape them, use single quotes around the string with the doubles inside:

Code: Select all

'<doc xmls="google.com" >':DSLink1.col:"</doc>"
(and vice-versa works as well)
-craig

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