how to print in next line

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
sudhakar_viswa
Participant
Posts: 85
Joined: Fri Nov 18, 2005 5:35 am

how to print in next line

Post by sudhakar_viswa »

Hi everybody,


I have to pass the data to unix.

"hello world" is my input
In unix it should store as hello in one line and world should store in next line

Thx,
i need to know datastage
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Add a line feed (Char(15)) to your derivation to add a line break.
sudhakar_viswa
Participant
Posts: 85
Joined: Fri Nov 18, 2005 5:35 am

Post by sudhakar_viswa »

Hi Arnd,

Thanx for your reply.But it is placing ^o between hello and world.That means hello ^oworld.it is not displaying in new line
i need to know datastage
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

Char(10) is the linefeed character, try it.
Success consists of getting up just one more time than you fall.
sekr
Participant
Posts: 14
Joined: Tue Dec 13, 2005 3:50 am

its char(10)

Post by sekr »

its a char(10)

example :-

col1:char(10):"sam"
in unix o/p is seen like

col1<value>
sam
In Adv Thanks
---------s
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

My misteak <sic>; the UNIX LF is CHAR(10)
kcshankar
Charter Member
Charter Member
Posts: 91
Joined: Mon Jan 10, 2005 2:06 am

Post by kcshankar »

Hi sudhakar,
Here is an alternative.
Ereplace(in.Source," ",Char(10))


regards
kcs
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Convert() is more efficient than Ereplace() for single character substitution.

You can gain further efficiency by initializing a stage variable (call it svLF) to Char(10) and not providing a derivation for it for each row. This means that the Char(10) function is evaluated only once.

Code: Select all

Convert(" ", svLF, InLink.TheString)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sudhakar_viswa
Participant
Posts: 85
Joined: Fri Nov 18, 2005 5:35 am

Post by sudhakar_viswa »

Thanks to everybody.The problem is solved.i.e char(10)
i need to know datastage
Post Reply