Hello
I have fixed with file as source in which there were couple of fields which were defined as Integer datatypes and right justified with leading spaces. Is it a common practice to have integer values as right justified. If i want to make the integers as left justified in the target file, is there a function in the transfomer that i can use?
Appreciate your help
Regards
Integers in fixedWidthfile
Moderators: chulett, rschirm, roy
Justification only applies to text fields. In order to left just try:
where MaxLen is the length of your left-padded string and In.Column is the text right-padded input column.
Code: Select all
Right(Space(MaxLen):TRIM(In.column),MaxLen
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It IS common practice that integers are right justified, sometimes left padded with space, sometimes left padded with zeroes.
You can handle it easily with Trim().
You can handle it easily with Trim().
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.