I'm reading a record from a sequential file which has a numeric value.
For eg: If the input is a negative number as -123456, the output should be -00000123456.00000(11 digits after '-' sign and five digits after decimal point).
If the input is a positive number as 123456, the output should be
000000123456.00000 (12 digits before decimal point nd five digits after decimal point).
I tried Fmt function, but i'm confused how to padd zeros to left and right side simultaneously. In the transformer i've declared the Length as 18, scale as 5 and Display as 18.
The derivation is
Code: Select all
If IsNull(DSLink3.Field001) Then 000000000000.00000 Else If Substrings(DSLink3.Field001,1,1)="-" Then "-":Fmt(Substrings(DSLink3.Field001,2,10),"12'0'L") Else ""
Thanks in advance,
Sumesh