Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] How to drop digits?
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] How to drop digits?
 Login/Join
 
Gold member
posted
Hi All.

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
 
Posts: 68 | Location: Abbotsford BC | Registered: March 15, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
Um, how about INT(Field * 100) / 100 ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.01OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 5885 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Silver Member
posted Hide Post
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 ;


7.7.05 Windows.
 
Posts: 34 | Location: UK | Registered: July 11, 2012Reply With QuoteReport This Post
Gold member
posted Hide Post
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.

Thanks!


WebFocus 8.104
Windows 7 Entreprise, SP1
 
Posts: 68 | Location: Abbotsford BC | Registered: March 15, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] How to drop digits?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.