Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP!!!! - PB10.5 DW rounding issue using Sybase Stored Proc returning FLOAT

320 views
Skip to first unread message

rodi...@gmail.com

unread,
Apr 30, 2013, 1:25:43 PM4/30/13
to
Hi PB experts,

I am having a rounding issue based on the PB DW display format on the Powerbuilder 10.5 datawindow (column type = NUMBER) where our data is stored in the Sybase ASE 12.5 database as datatype = FLOAT.

Is there a fix for the datawindow to correctly round the value based on the display format's decimal digits accuracy? I have a Float value = 1.025, but the PB DW column display of 2 decimal digits shows as value = 1.02. The PB DW is expected to round the 1.025 value to the 1.02 on the DW display since the display format = "#0.00" (2 decimal digits). Sometimes the DW display format will NOT round up correctly.

Is there an PB 10.5 patch for datawindow display format rounding issue? If not, is there a workaround??? I am currently running Powerbuilder Enterprise Version 10.5 Build 4523. Please let me know.

Table gas_comp
(
gas_id int,
gas_date datetime,
btu float,
spec_gvty float,
n2 float,
co2 float,
trans_timestamp datetime
)

My stored proc retrieve is as follows:

select gas_id,
gas_date,
round(btu, 8) btu,
round(spec_gvty, 8) spec_gvty,
round(n2, 8) n2,
round(co2, 8) co2,
trans_timestamp
from gas_comp
where gas_id = @gas_id

The stored proc result set is as follows:
btu = 1000.5
spec_gvty = 0.60005
n2 = 1.025
co2 = 1.075

Problem is in the Powerbuilder 10.5 data window display values of:

btu = 1001 (Correct, DW column type = "number", display format = "#0")
spec_gvty 0.6001 (Correct,DW column type = "number", display format = "#0.0000")
n2 = 1.02 (WRONG!!!, DW column type = "number", display format = "#0.00")
co2 = 1.08 (Correct, DW column type = "number", display format = "#0.00")

Why is the "n2" column display NOT rounding up to 1.03 where the FLOAT value = 1.025?

Please reply back. Thanks.

bruce.arm...@gmail.com

unread,
Aug 30, 2013, 5:02:21 PM8/30/13
to
The Sybase servers that Google groups is attempting to provide access to no longer exist. They were shut down on March 28th of 2013.

Instead, post your question in the SAP Community Network (SCN) PowerBuilder Developer Center forums:

http://scn.sap.com/community/developer-center/powerbuilder/content?filterID=content~objecttype~objecttype[thread]
0 new messages