Hi,
My source values are like :
2
3
10
100
My required target is :
002
003
010
100
Please help me how to pad zeros on left side to an integer using transformer stage.
Thanks,
Eswar
Pad zero on leftside to integer
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 397
- Joined: Wed Apr 12, 2006 2:28 pm
- Location: Tennesse
You may be a bit confused here: integer is a storage format, but you are describing a requirement for displaying the data.
The easiest way to handle this is to convert the integer to a char or varchar before sending it to your display output. The only alternative is to store it in the display format, but that's not efficient for disk or processing.
The easiest way to handle this is to convert the integer to a char or varchar before sending it to your display output. The only alternative is to store it in the display format, but that's not efficient for disk or processing.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Fmt() is not available in Parallel jobs.samsuf2002 wrote:You can use FMT().
Do a search to find out how, based on your requirement.
Provided the target is a string, you can use string functions to pad with leading zeroes. For example:
Code: Select all
Right("000" : InLink.TheValue, 3)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.