what is New line character in map?

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
Sne
Participant
Posts: 5
Joined: Wed Mar 14, 2007 4:56 am

what is New line character in map?

Post by Sne »

My input file is in the form abc|xyz|lmn|...
I need to substitute the pipe character (|) with the new-line character.

I need full syntax for the function "substitute" in my map, so that my output file would be
abc
xyz
lmn
and so on ...


Thanks in Advance
Sneha
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi Sneha,

Welcome Aboard :D !!!
Should be char(13) with the convert function.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

New line in Windows is CR LF or 0D0A. When run on Unix I believe its LF or 0A.

So you could use substitute(text, "|", "<NL>") and it should replace the character according to the environment your compiled in. If you want to make sure its alway Line feed do one of the following....

substitute(text, "|", "<LF>")
substitute(text, "|", "<<0A>>")
Post Reply