how to fill fields with zeros.

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
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

how to fill fields with zeros.

Post by I_Server_Whale »

Hi All,


Suppose I have to fill a target field of length 10. How do i fill this field with all zeroes. Any help is appreciated.

Thanks a lot,
naveen.
logic
Participant
Posts: 115
Joined: Thu Feb 24, 2005 10:48 am

Post by logic »

"000000000" in transformer derivation of that field..(?)
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Alternatively, you can use

Code: Select all

Str("0",10)
in your transformer derivation section.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And on the chance you meant zero fill (or pad) a field to 10 characters that may have less than 10 characters in it, check out the FMT function.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

For example

Code: Select all

Fmt("0", "R%10")
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