sthirumalai New User Joined: 14 Aug 2007 Posts: 14 Location: Chennai
I have a field which is 9(8) COMP staring from the position 24 in a flat file.
I want to convert that into a packed decimal value S9(15)V9(03) COMP-3 and write the value staring from 73 rd position in my output file.
I used the following statemeny in my sortcard
But the values converted are incorrect.
If the 9(8) COMP value is 400 then i received 0.400 in my output file after conversion. But the result must be 400.000 in my output.
Can any one help me to fix this issue?
Thanks & Regards
dbzTHEdinosauer Global Moderator Joined: 20 Oct 2006 Posts: 6968 Location: porcelain throne
i received 0.400 in my output file after conversion.
you lie, you lie, you lie!!!
BI,TO=PD will not generate a decimal point '.' in the output.
probably help if you were to provide: then someone can provide better guidance. example input with bbcode tags expected output with bbcode tags allllllllll the control cards you are currently using.
Skolusu Senior Member Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
comp fields does not have decimals. so if your intention is to take an absolute value and pad with 3 decimals then you need to multiply it with 1000 and convert it to pd format. Also use FI instead of BI so that you can account for negative numbers also.
Use the following control cards
All times are GMT + 6 Hours