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.
My previous working day suddenly stopped working. I am using the following syntax over a month. -SET &PRIBUSDAY = DATEMOV(&YYMD, 'PWD'); it is setting to 20070908 instead of 20070910.
Thanks, SG.This message has been edited. Last edited by: Kerry,
Webfocus 7.6.8 PDF,HTML & EXCEL
Posts: 32 | Location: memphis,tn | Registered: January 25, 2007
I've been led to believe that Date functions will only work with Date fields, in Dialogue Manager &YYMD is an alphanumeric value, not a Date field. You can use Date functions in Dialogue Manager if you convert the date to a Date field before applying the function.
The inner DATECVT function converts &YMMD to a Date field, then DATEMOV is applied, then the outer DATECVT converts the result back to an alphanumeric field.
Ridiculous, non?
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
And similarly, 'NBD' returns the following Tuesday for a weekend argument date.
-- Apparently the DATECVT function first adjusts a non-business-day argument date in the indicated direction to a business day, and then continues to the adjusted argument date's prior or next business day.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Let's just say it's disappointing that the functions were not properly QA'd.
Note that Patricia's work-around will fail if and when IBI fixes DATEMOV. Here's a safer workaround.
-* To compute &OUT = the weekday following &IN (both as simple +yyyymmdd integer values):
-SET &OUT1 = DATECVT( DATEMOV( DATECVT(&IN ,'I8YYMD','YYMD') ,'NWD') ,'YYMD','I8YYMD');
-SET &OUT2 = DATECVT( DATEMOV( DATECVT(&OUT1,'I8YYMD','YYMD') ,'PWD') ,'YYMD','I8YYMD');
-SET &OUT = IF (&OUT2 GT &IN) THEN &OUT2 ELSE &OUT1;
-* To compute &OUT = the weekday preceeding &IN:
-SET &OUT1 = DATECVT( DATEMOV( DATECVT(&IN ,'I8YYMD','YYMD') ,'PWD') ,'YYMD','I8YYMD');
-SET &OUT2 = DATECVT( DATEMOV( DATECVT(&OUT1,'I8YYMD','YYMD') ,'NWD') ,'YYMD','I8YYMD');
-SET &OUT = IF (&OUT2 LT &IN) THEN &OUT2 ELSE &OUT1;
&OUT1 is the weekday date returned by DATEMOV, and &OUT2 is its neighbor back in the direction of the original date. We test whether &OUT2 looks right (where it lies in relation to the input date): - If &OUT2 looks wrong, &OUT1 is the correct result; - If &OUT2 looks right, &OUT1 must have overshot the goal, and &OUT2 is the correct result.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
And here we thought we were the only ones having problems. Here's our solution which also includes holidays since we were unable to get that to work either.
-SET &EDATE = IF &TOD GT 17.00.00 THEN AYMD(&YYMD, 1, 'I8YYMD') ELSE &YYMD;
DDATE/YYMD = &EDATE;
T1/MDYY=DDATE;
T3/I2=IF '&W1' EQ 'MON' THEN 3 ELSE 1;
T4/MDYY=T1-T3;
T5/I8YYMD=T4;
T6/I8=T5;
-*
-*Looks at previous day to determine if that day was a holiday
-*If so, force it to look at the most recent work day
-*
TDATEI/I8 = DECODE T6(20060102 20051230
20060414 20060413
20060529 20060526
20060704 20060703
20060904 20060901
20061123 20061122
20061124 20061122
20061225 20061222
20061226 20061222
20070707 20071229
20070406 20070405
20070528 20070525
20070704 20070703
20070903 20070831
20071122 20071121
20071123 20071121
20071224 20071221
20071225 20071221
20080101 20071231
20080321 20080320
20080526 20080523
20080704 20080703
20080901 20080829
20081127 20081126
20081128 20081126
20081225 20081224
20081226 20081224
20090101 20081231
20090410 20090409
20090525 20090522
20090703 20090702
20090907 20090904
20091126 20091125
20091127 20091125
20091224 20091223
20091225 20091223);
TDATE/I8 = IF TDATEI EQ 0 THEN T6 ELSE TDATEI;
Focus Community, You are not dead, yet "Don't you think it's ridiculous" "Nice to think out of the box" How nice to read, Real thanks. Cordially and Focusely. PS : When I learnt (and never mastered) APL, someone told me that you had turned into a langage when you came to feel as Natural, dirty tricks to reach your goal. I have some "Focuseries" that I particularly cherish Last : Come to think to the enormous amount of money that went around Year 2K. "Wasn't it ridiculous" or worse ?
Focus Mainframe 7.6.11 Dev Studio 7.6.11 and !!! PC Focus, Focus for OS/2, FFW Six, MSO