Number Formatting Issue using OCONV()
Posted: Tue Oct 28, 2003 9:58 pm
Dear All,
I have one field(Interest_Rate) in my ardent which is a decimal value.But when i am writing into a file i require that number as S9(10)V9(8) format (COBOL format ie Sign in Front)...
For example if THE Interest_Rate is say '4.5678' then it should be formatted as '000000000456780000' .
Please help me how to use the OCONV() or FMT() funtion for the same.
I Tried using
IF (Interest_Rate < 0) Then
"-" : OCONV(ABS(Interest_Rate) * 100000000, "MR0(%18)")
Else
" " : OCONV(ABS(Interest_Rate) * 100000000, "MR0(%18)")
But the above mentioned thing is not working for me...
Thanks & Regards,
K.S.Rajan.
I have one field(Interest_Rate) in my ardent which is a decimal value.But when i am writing into a file i require that number as S9(10)V9(8) format (COBOL format ie Sign in Front)...
For example if THE Interest_Rate is say '4.5678' then it should be formatted as '000000000456780000' .
Please help me how to use the OCONV() or FMT() funtion for the same.
I Tried using
IF (Interest_Rate < 0) Then
"-" : OCONV(ABS(Interest_Rate) * 100000000, "MR0(%18)")
Else
" " : OCONV(ABS(Interest_Rate) * 100000000, "MR0(%18)")
But the above mentioned thing is not working for me...
Thanks & Regards,
K.S.Rajan.