Focal Point
Is there a way to set MISSING ON to all InfoAssist DEFINEs by default?

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

November 05, 2013, 10:02 AM
Jgeorge
Is there a way to set MISSING ON to all InfoAssist DEFINEs by default?
Is there a way to set MISSING ON to all InfoAssist DEFINEs by default?

Right now, if MISSING ON is not added to a DEFINE format

E.g., Date_Quarter/Q = DATECVT (HDATE(DateOfBirth,'YYMD'), 'YYMD','Q')

The DEFINE evaluates to "Q4" for records that do not have a date time

E.g.:

ID Date Date_Quarter
===========================

1001 1/1/2009 Q1
1002 . Q4
1003 . Q4


The above Define output is incorrect for the last 2 records.

If a user types in MISSING ON after "Q" format in DEFINE, then the DEFINE properly evaluates missing/blank values:

E.g., Date_Quarter/Q MISSING ON = DATECVT (HDATE(DateOfBirth,'YYMD'), 'YYMD','Q')

ID Date Date_Quarter
===========================

1001 1/1/2009 Q1
1002 . .
1003 . .


WebFocus v8002M
Windows 2008
InfoAssist reports
November 06, 2013, 09:01 AM
jgelona
First, I don't know of any setting to default MISSING ON for all DEFINES.

For this issue, do a ? SET ALL and what is the value of DATEDISPLAY? If it is OFF, then I would say you have a bug in the HDATE and/or the DATECVT Functions. I suspect that either or both are converting the null date to the base/zero date (12/31/1900) and DATECVT is returning Q4 because that date is Q4 for 1900. However if DATEDISPLAY is OFF, then I would say the expected return value is blank (not null or Q4).

DATEDISPLAY
The DATEDISPLAY parameter controls the display of date format fields that contain the value zero. When set to on, the base date is displayed for those fields. By default, the value zero in a date format field, such as YYMD is returned as a blank.

The syntax is:

SET DATEDISPLAY = {ON|OFF|COMP}
where:

ON
Returns the base date for a date format field containing the value zero.

OFF
Returns a blank for a date format field containing the value zero. OFF is the default.

COMP
Returns a z/OS compatible blank for a date format field containing the value zero. The COMP value is required to return a blank in portable code.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
November 12, 2013, 02:42 PM
Jgeorge
It's OFF (DATEDISPLAY OFF ) so looks like the functions do not evaluate null/missing properly.


WebFocus v8002M
Windows 2008
InfoAssist reports
November 13, 2013, 09:05 AM
jgelona
Jgeorge, I suggest you open a case with IBI. In the meantime you can get around this issue with this:
Date_Quarter/Q MISSING ON=
  IF DateOfBirth IS MISSING
    THEN MISSING ELSE DATECVT (HDATE(DateOfBirth,'YYMD'), 'YYMD','Q');



In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.