Focal Point
[CASE-OPENED] HYYMDS Rounding?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6467060436

October 10, 2013, 05:33 PM
Doug
[CASE-OPENED] HYYMDS Rounding?
Here's a new one, at least for me: I have a field in the source file (1010data) which has a value of "09/03/13_21:30:00" which displays as "09/03/13_21:29:59" in my WebFOCUS report. It's in the synonym as "FIELDNAME=STARTTIME, ALIAS=STARTTIME, USAGE=HYYMDS, ACTUAL=HYYMDS, MISSING=ON, $".

What I want is for it to display as "09/03/13 21:30:00" or "2012/09/03_21:30:00"... Not ...29:59

I appreciate your thoughts on this.

~ Doug

This message has been edited. Last edited by: <Kathryn Henning>,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
October 10, 2013, 05:42 PM
Waz
What do you get if you pull the datetime as an A17 field ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 10, 2013, 05:48 PM
Doug
I get
 ERROR AT OR NEAR LINE     10  IN PROCEDURE ADHOCRQ FOCEXEC *
 (FOC36346)  INCORRECT USE OF DATE-TIME FIELD OR CONSTANT
 (FOC009) INCOMPLETE REQUEST STATEMENT
 BYPASSING TO END OF COMMAND
When I do a
COMPUTE HYYMDa17/A17 = ADJSTARTN ;
OR
COMPUTE HYYMDa17/A17 = EDIT(ADJSTARTN) ;

This message has been edited. Last edited by: Doug,
October 10, 2013, 05:53 PM
Doug
I get this:
LIST STARTN              HYYMDs                  HYYMDS              HYYMDm 
1    2013/09/03 21:29:59 2013/09/03 21:29:59.000 2013/09/03 21:29:59 2013/09/03 21:29:59.000000 
2    2013/09/03 18:00:00 2013/09/03 18:00:00.000 2013/09/03 18:00:00 2013/09/03 18:00:00.000000 
3    2013/09/03 16:59:59 2013/09/03 16:59:59.000 2013/09/03 16:59:59 2013/09/03 16:59:59.000000 
4    2013/09/03 13:00:00 2013/09/03 13:00:00.000 2013/09/03 13:00:00 2013/09/03 13:00:00.000000 

From this:
TABLE FILE [FILENAME]
LIST STARTN 
COMPUTE HYYMDs/HYYMDs = STARTN ;
COMPUTE HYYMDS/HYYMDS = STARTN ;
COMPUTE HYYMDm/HYYMDm = STARTN ;
. . .
END

October 10, 2013, 06:23 PM
Waz
I was suggesting changing the field forat in the master.

And it wasn't A17, its A23.

I think it is:
FIELDNAME=STARTTIME, ALIAS=STARTTIME, USAGE=A23, ACTUAL=A23, MISSING=ON, $

This will show you what is being returned from the call to the DB.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 11, 2013, 01:08 AM
njsden
Would you see a difference if you change the definition of STARTN in your master to ACTUAL=HYYMDm, USAGE=HYYMDm so the adapter reads the value with the highest precision possible?

Being as it is right now, STARTN is only getting data down to the SECOND, and I guess that any further COMPUTE to try to get more granular information (s, m) may not work as that information is already "lost" in virtue of the source value being read as HYYMDS.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
October 11, 2013, 09:09 AM
Doug
FORMAT  SHOWS AS
A17     .
A23     2013-09-03 21:29:59
HYYMDS  2013-09-03 21:29:59

It may be getting lost in translation. I'm working on vairous options in a copy of the synonym (to the same table) now.
October 13, 2013, 04:54 PM
Waz
Are you sure the other end isn't rounding ?
Is the source 21:29:59, but is rounding to 21:30:00 in display.

The A23 should show the value retrieved from the DB.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 14, 2013, 08:42 AM
Doug
I'm still checking in to that Waz. They say it's 2013/09/03 21:30:00. But, I'm seeing 2013/09/03 21:29:59. I may open a case on this...
October 14, 2013, 10:11 AM
susannah
can you do math with these dates?
if so, how about add half a second?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 14, 2013, 04:13 PM
Doug
Yeah, but the issue is that it doesn't seem consistent, as to when the second is lost. It's lost on some values and not on others. It may be time for a Case Frowner
October 14, 2013, 04:43 PM
Waz
Have you tried another client to access this data and see what that pulls out ?

I have a nasty feeling that this is a byproduct of the way that the datetime is stored in the DB.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 15, 2013, 10:03 AM
Francis Mariani
We've found inconsistent rounding on numeric columns since we upgraded from v7.7.03 to v.7.7.05 (I haven't paid attention to date/time columns).


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 15, 2013, 01:28 PM
Doug
I hope not and I have faith in 1010data. I did open a case with IB and we'er working on it. But, this may be a byproduct of the way that the datetime is stored in the DB. I'll keep you posted.
Not sure if I should be Music or Sweating.
October 15, 2013, 04:22 PM
Waz
quote:
We've found inconsistent rounding on numeric columns since we upgraded from v7.7.03 to v.7.7.05


Can you give more details on this, it worries me a lot.

Formats, etc ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 15, 2013, 04:58 PM
Francis Mariani
Sorry for the alarmist comment - this happens when retrieving data from Oracle. Case number 92732542.

This occurs when the column is defined as a NUMBER in Oracle, without scale or precision. WebFOCUS metadata default for these columns: USAGE=D20.2, ACTUAL=D8

"It makes no sense that x.415 becomes 0.42 while x.715 becomes x.71. It's just plain inconsistent."

The rounding seemed to have changed in the data adapter. Unfortunately the database modeller was perhaps lazy when designating the size of the numeric columns.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 15, 2013, 05:18 PM
Waz
Thanks Francis, a bit of a load off......


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 01, 2013, 09:38 AM
Doug
IB found an issue in the 1010data Adapter which we're using and has provided the new adapter to us. Now, to get that in place...