As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
After an upgrade to WF 7703 (from 7611) one of our reports shows the error from the subject. I'm stumped why though...
The code in question is:
DEFINE FILE OEE_DATA
DATETIME/HMtDYYmA = HINPUT(14,
EDIT(D4, '$$$99999999')||
EDIT(D5, '$$$$$999999'), 10, DATETIME);
INTERVAL/I6 = HDIFF(DATETIME, LAST DATETIME, 'second', INTERVAL);
TIME_PASSED/I10 = IF LAST DATETIME EQ MISSING
THEN 5
ELSE INTERVAL;
END
TABLE FILE OEE_DATA
PRINT DATETIME TIME_PASSED
WHERE RECORDLIMIT EQ 25;
END
Which results in:
0 ERROR AT OR NEAR LINE 8 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC148) ERROR IN USE OF 'IS MISSING'
(I cut the other errors out, they're a result of the above)
What's wrong with this use of IS MISSING?!? At the first record, LAST DATETIME is missing, isn't it?This message has been edited. Last edited by: Wep5622,
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
DEFINE FILE OEE_DATA
DATETIME/HMtDYYmA = HINPUT(14,
EDIT(D4, '$$$99999999')||
EDIT(D5, '$$$$$999999'), 10, DATETIME);
XXX/I1 = 1;
INTERVAL/I6 = HDIFF(DATETIME, LAST DATETIME, 'second', INTERVAL);
TIME_PASSED/I10 = IF LAST XXX NE 1
THEN 5
ELSE INTERVAL;
END
TABLE FILE OEE_DATA
PRINT DATETIME TIME_PASSED
WHERE RECORDLIMIT EQ 25;
END
I suppose the real question is, what is the value of LAST DATETIME for the first record really? Apparently it's neither MISSING or 0 or '' or HINPUT(1, '0', 10, superfluously_duplicated_variable_name_here)...
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Unfortunately EQ MISSING and IS MISSING are equivalent according to the documentation. Reality seems to match the documentation in this case.
That aside, as you can see from the title of this topic, WebFOCUS already interprets my EQ MISSING as IS MISSING, or it wouldn't have known to raise that error
Is the behaviour of LAST defined for the first record of a result set? Is that an uninitialised value, for example? Is there anything we can compare it to in a useful manner, and if so, what is that value for each data type?
In my workaround I used a constant value to match up against LAST, but if the value of LAST XXX is in fact uninitialised, there is theoretically a chance that it is the same value as the chosen constant (1 in this case). Is that correct? If so, how to prevent that?
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
The field itself (or the fields it's derived from, rather) isn't actually capable of being MISSING. That's an artifact of the field being used in combination with the LAST function.
The LAST function doesn't have a result field parameter, but if it had it should probably be defined with MISSING.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
I think this might be a bug. As far as I know, LAST works with all other data types, including SmartDates, to test the value of a field prior to record #1. Another work-around (besides the one you've already posted), is to test the prior date-time value against the current date-time value instead of against a constant:
TABLE FILE GGSALES
SUM
COMPUTE NEW_DATE/YYMD = DATE ;
COMPUTE DATE_TIME/HMtDYYmA = HDTTM(NEW_DATE,12,DATE_TIME);
COMPUTE INTERVAL/I6 = HDIFF(DATE_TIME, LAST DATE_TIME, 'HOURS', INTERVAL);
COMPUTE TIME_PASSED/I10 = IF (INTERVAL EQ 0) AND (DATE_TIME NE LAST DATE_TIME) THEN 5 ELSE INTERVAL ;
BY DATE NOPRINT
WHERE RECORDLIMIT EQ 200 ;
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007