Stopping transformer from interpreting

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Maximus_Jack
Premium Member
Premium Member
Posts: 139
Joined: Fri Apr 11, 2008 1:02 pm

Stopping transformer from interpreting

Post by Maximus_Jack »

Hi
In the transformer i'm replacing the New Line with "
" but in the
dataset i'm seeing the output as just "&", is there anyway to get the value as it is

Input
-------
value1( New Line)
value2

present output
-----------------
value&value2

expected output
--------------------
value
value2

i'm using the syntax

Convert(Char(10),"
",lk_orac.line1)

any help is appreciated

FYI- this output is finally going to an XML output stage

thanks
MJ
Last edited by Maximus_Jack on Wed Apr 09, 2014 9:32 pm, edited 1 time in total.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

The convert function will convert from a list of characters to a list of corresponding characters, one character at a time, rather than from one character to a string of many.
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

For that you'd need the parallel version of EReplace, posted here as pxEReplace by (most recently) the user PhilHibbs. However, I seem to recall it being... leaky.

There's an official IBM version but from what I recall, you'd have to upgrade into the 9.x world to get it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ssnegi
Participant
Posts: 138
Joined: Thu Nov 15, 2007 4:17 am
Location: Sydney, Australia

Reply

Post by ssnegi »

Field(value1,'new line',1):'
'
extract the string before the new line using field function and then concatenate with the desired string.
Last edited by ssnegi on Wed Apr 09, 2014 11:16 pm, edited 1 time in total.
Post Reply