How to add tab space between two strings

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
Network_CIS
Premium Member
Premium Member
Posts: 12
Joined: Thu Jul 30, 2009 1:33 am
Location: Melbourne

How to add tab space between two strings

Post by Network_CIS »

Hi all,
could you please suggest how to add a Tab Space between two strings in transformer.

eg. A="ABC"
and B="XYZ"

I need output as "ABC <\t> XYZ"

Thanks in advance

Regards,
Satish
Network_CIS
Premium Member
Premium Member
Posts: 12
Joined: Thu Jul 30, 2009 1:33 am
Location: Melbourne

Post by Network_CIS »

Found the solution :)

"string1" : Char(9) : "string2"


Char(9) is a conversion function.

Cheers!!
BugFree
Participant
Posts: 82
Joined: Wed Dec 13, 2006 6:02 am

Post by BugFree »

Satish,

try -> "ABC" : CHAR(09) : "XYZ"
Ping me if I am wrong...
BugFree
Participant
Posts: 82
Joined: Wed Dec 13, 2006 6:02 am

Post by BugFree »

sorry.. i was slow... :lol:
Ping me if I am wrong...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Performance tip:

Initialize a stage variable (let's call it svTab) to Char(9). Do not provide a per-row derivation for this stage variable. Use svTab rather than Char(9) in your expressions.

This way the Char(9) function is evaluated only once for the job, rather than once per row.

Char() and Seq() functions are quite expensive, because they have to perform a lookup into the terminfo database.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply