I have some data in format P23.9. The user wants the last 7 digits dropped, with NO rounding.
P23.2, F7.2 and D23.2 round up.
Thoughts?This message has been edited. Last edited by: FP Mod Chuck,
WebFocus 8.104 Windows 7 Entreprise, SP1
October 07, 2018, 04:14 PM
Um, how about INT(Field * 100) / 100 ?
HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code
October 08, 2018, 07:23 AM
Good old Cobol truncates by default so the challenge there is to remind people to specify 'rounded' to stop the truncation. How about subtracting .005 as you compute the new 2dp field - this way the rounding will look and feel like a truncation? So compute newfield/D23.2= oldfield - 0.005 ;
October 11, 2018, 04:58 PM
Great suggestions guys, I got it to work! I rarely deal with this kind of issue, so both suggestions weren't something I would have thought of on my own.