10-29-2007 5:50 AM
Hi all,
I have to convert floating point number to numeric type what is the best way of conversion so as to display by concatenating.As while concatenating only character type fields can be used.
thanks,
mahesh
11-07-2007 7:08 AM
hi,
Source Type Floating Point Number
Conversion table for source type F
Target Conversion
C The floating point number is converted to the <mantissa>E<exponent>
format and transported to the character field. The value of the mantissa lies between 1 and 10 unless the number is zero. The exponent is always signed. If the target field is too short, the mantissa is rounded. The length of the character field must be at least 6 bytes.
D The source field is converted into a packed number. The packed number is then converted into a date field (see corresponding table).
F Transport without conversion.
N The source field is converted into a packed number. The packed number is then converted into a numeric text field (see corresponding table).
I, P The floating point number is converted to an integer or fixed point value and, if necessary, rounded.
STRING As for fields of type C, except that the maximum number of places is used for the mantissa (maximum precision). Despite this, different signs or exponents can lead to different string lengths.
T The source field is converted into a packed number. The packed number is then converted into a time field (see corresponding table).
X The source field is converted into a packed number. The packed number is then converted into a hexadecimal number (see corresponding table).
XSTRING As for fields of type X, except that leading zeros are not copied.
<b>reward points if useful</b>
regards,
pavan
11-07-2007 7:16 AM
11-07-2007 7:19 AM