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.
What command would be used to extract the year only from PLANNED_END...ex 2009 and place it in a field PLANNED_YEAR?This message has been edited. Last edited by: Kerry,
This can be done in one line, using Date-Time function HNAME or HPART:
DEFINE FILE CAR
PLANNED_END/HYYMDS WITH COUNTRY = HINPUT(14, '20090509000000', 8, 'HYYMDS');
END
TABLE FILE CAR
SUM
SALES
COMPUTE PLANNED_YEAR_ALPHA/A4 = HNAME(PLANNED_END, 'YEAR', 'A4');
COMPUTE PLANNED_YEAR_NUM/I4 = HPART(PLANNED_END, 'YEAR', 'I4');
BY COUNTRY
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
Thanks for the response. I added both COMPUTE statements after my Define file statement.
When I reference YEAR_ONLY field in my Print statement (line 34) I get the following errors.
Could the format be incorrect on the COMPUTE statements?
(FOC259) FIELDNAME EXCEEDS ITS MAXIMUM SIZE: COMPUTE YOUR_DATE (FOC259) FIELDNAME EXCEEDS ITS MAXIMUM SIZE: COMPUTE YEAR_ONLY 0 ERROR AT OR NEAR LINE 34 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC003) THE FIELDNAME IS NOT RECOGNIZED: YEAR_ONLY
Why do you have a DEFINE FILE statement? I need one to simulate a Date-Time (HYYMDS) field in the CAR file, but you already have a Date-Time (HYYMDS) field, PLANNED_END.
Verify that PLANNED_END is indeed a HYYMDS field.
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