Setting the format to column in transformer stage

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
Coles
Premium Member
Premium Member
Posts: 6
Joined: Mon Oct 26, 2015 8:18 pm
Location: Melbourne

Setting the format to column in transformer stage

Post by Coles »

Hi All,

I have a requirement where in I need to set the format for all the values in a column to the following..

Input : 1 1.95 1.2

Output: $1.00 $1.95 $1.2

Append with a $ symbol in the start and append decimal with two zeros

I looked for FMT function which is available in Sequence User Variable stage.


I need to apply this in a transformer.. Can anyone please suggest some ideas..

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

Post by ray.wurlod »

There's nothing like the Fmt() function in the parallel Transformer stage. You could convert the source data using StringToDecimal() or DecimalToDecimal() as appropriate then prepend the result with the string "$".
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