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.
Is this a bug? HSETPT seems to totally ignore the WEEKFIRST parameter.
SET WEEKFIRST = 2
DEFINE FILE CAR
TODAYSTR/A10 = TODAY(TODAYSTR);
TODAY/HYYMDS = HINPUT(10, TODAYSTR, 8, TODAY);
WEEKEND/HYYMDS = HSETPT(TODAY, 'weekday', 7, 8, WEEKEND);
END
TABLE FILE CAR
PRINT WEEKEND
BY CAR
IF RECORDLIMIT EQ 1
END
SET WEEKFIRST = 5
DEFINE FILE CAR
TODAYSTR/A10 = TODAY(TODAYSTR);
TODAY/HYYMDS = HINPUT(10, TODAYSTR, 8, TODAY);
WEEKEND/HYYMDS = HSETPT(TODAY, 'weekday', 7, 8, WEEKEND);
END
TABLE FILE CAR
PRINT WEEKEND
BY CAR
IF RECORDLIMIT EQ 1
END
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 :
As far as I know, WEEKFIRST has influence on the weeknumbering, not on the days of the week. In your example you're only setting the day of the week in the date/time field, that's all. It has got nothing to do with weeknumbers, just with the numbering of the days within the week - and that ain't gonna change.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
WEEKFIRST tells at what offset the week starts, doesn't it? How can that not have an impact on the numbering of days in the week?!?
Is there any other way to get ISO8601 day numbers? How are we supposed to do that?
I know how to convert the numbers using IMOD and +6 as an offset, but that makes a terrible mess of the given example.
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 :
WEEKFIRST specifies which day of the week is the first. That does not alter the fact that sunday will always be numbered as day 1, monday is day 2 aso until saturday being day 7. WEEKFIRST only says that the week starts at day x. Day 7 will however always remain saturday.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
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 :