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.
TABLE FILE XXX PRINT ----- ----- WHERE HDATE(DATE_FIELD,'YYMD') EQ YESTERDAY AND ------------------------ END
DATE_FIELD is in 'HYYMDm' format.
Is there anything that looks incorrect in the code? How can I achieve this in any other way? Please help.This message has been edited. Last edited by: Prash1983,
(FOC1400) SQLCODE IS -99999 (HEX: FFFE7961) : [01S01] [IBM][CLI Driver] CLI0165E Error in row. SQLSTATE=01S01 [5U026] : [IBM][CLI Driver][DB2/AIX64] SQL0969N There is no message text corresp : onding to SQL error "-4712" in the message file on this workstation. Th : e error was returned from module "SQLRW082" with original tokens "SQRR1 : 11". SQLSTATE=5U026 (FOC1407) SQL FETCH CURSOR ERROR. (FOC1400) SQLCODE IS 1400 (HEX: 00000578) : SQLCODE IS -99999 (HEX: FFFE7961) (FOC1407) SQL FETCH CURSOR ERROR. : XXX
Please note that the code works when hard-coded value is passed instead of a variable.
I would never use a DEFINE based WHERE statement - the WHERE does not get passed to SQL, WebFOCUS will return all the data before applying the WHERE.
This is the message you'd get:
FOC2598 - FOCUS IF/WHERE TEST CANNOT BE PASSED TO SQL : WHERE expression
The right way to do it would be to create a Dialogue Manager variable with yesterday's date (to use Date functions in Dialogue Manager you need to use DATECVT to convert a string to a date and then back to a string) and use yesterday and today as from-to selection criteria. Something like this:
-SET &YESTERDAY = DATECVT((DATEADD((DATECVT(&YYMD, I8YYMD, YYMD)), D, -1)), YYMD, I8YYMD);
TABLE FILE TIME_CNTL
PRINT
*
WHERE UPDATE_TIMESTAMP GE DT('&YESTERDAY 00:00:00.000') AND UPDATE_TIMESTAMP LT DT('&YYMD 00:00:00.000');
END
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