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.
-SET &ECHO='ALL'; -*RETAILER WEEK IS FROM SUNDAY TO SATURDAY SET WEEKFIRST = 1; -********************************************************************************** -*set up defaults -DEFAULT &OUTPUT = 'HTML'; -DEFAULT &COMPANY = '$*'; -DEFAULT &DIVISION = '$*'; -DEFAULT &SEASON='$*'; -DEFAULT &YEAR='$*'; -DEFAULT &BRAND ='$*'; -DEFAULT &RETAILER ='$*'; -DEFAULT &INDATE = '$*'; -* -* -********************************************************************************** -*SET REPORT OUTPUT -SET &HLD = '-*'; -IF &OUTPUT EQ 'REPORT' GOTO SKIPHOLD; -SET &HLD = IF &OUTPUT EQ 'PDF' THEN 'ON TABLE PCHOLD FORMAT PDF' - ELSE IF &OUTPUT EQ 'EXL2K' THEN 'ON TABLE PCHOLD FORMAT EXL2K' - ELSE &HLD ; -SKIPHOLD -********************************************************************************** -*SET PATH TO GET FILES APP MAP FOCHOLD C:\Inetpub\wwwroot\Output_Hold\ APP HOLD FOCHOLD -* -* GET NRF CALENDAR DATES FOR MONTH-TO-DATE DEFINE FILE MK_CALENDR IN_DATE/HYYMD = DT(&YYMD 12:00:00); -IF &INDATE EQ '$*' THEN GOTO SKIP_INDATE; -IF &INDATE EQ '' THEN GOTO SKIP_INDATE; IN_DATE/HYYMD = DT(&INDATE 12:00:00); -SKIP_INDATE OUT_F/YYMD = DATECVT(NRF_FROM, 'I8YYMD','YYMD'); OUT_T/YYMD = DATECVT(NRF_TO, 'I8YYMD','YYMD'); OUT_FROM/HYYMD = HDTTM(OUT_F, 8,'HYYMD'); OUT_TO/HYYMD = HDTTM(OUT_T, 8,'HYYMD'); OUT_2/HYYMD = HADD(OUT_TO, 'DAY',1, 8,'HYYMD'); END TABLE FILE MK_CALENDR PRINT IN_DATE OUT_F OUT_T OUT_2 WHERE IN_DATE GE OUT_FROM; WHERE IN_DATE LT OUT_TO; -*ON TABLE HOLD AS CLL FORMAT ALPHA END -*RUN -*READ CLL &I_FROM.A8. &I_TO.A8. -*TYPE &I_FROM -*TYPE &I_TO
Evrything works fine except when the "TO" date is equal to one of the "END DATES", then it all blows up for some reason because I assume it doesn't find the end date. I f I change OUT_2 for OUT_TO the n it works.
MY QUESTION, is this normal behaviour for smart dates? When you use the built in functions for converting/creating smart dates what gets put into the time portion?
Just a inquiry so I know how code smart-dates in the future.This message has been edited. Last edited by: <Mabel>,
These aren't smart dates. they're date-times; totally different animals. If you don't need time, or you dont need the special formatting available to datetimes, just use smart dates. also SKIP is a java reserved word (see thread way down on this board) so you may blow up at some point, depending on your version. So i recommend changing it to SKP
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
In the originsal version it was LE, when I pushed the to-date 1 day forward I changed it to LT. What I'll do is follow susanah's suggestion and work with the YYMD format of the dates (without the time portion).