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.
I’m trying to use the next business day functions in Dialog Manager and am getting very erratic results. The following code will be working just fine but then suddenly start returning 19001231 after making a seemingly insignificant change like adding another -SET line. I can undo the change I made but the NBD functions remain "corrupted".
-DEFAULT &INPUTDATE = &YYMD SET BUSDAYS = _MTWTF_ SET HDAY = 2008
As suddenly as it stops working it may suddenly start working again. Sometimes after a copy and paste into a new FEX. Other times after an hour. Other times the next day.. etc. Very strange.
-Dave
WebFOCUS version 761. Windows operating system. SQL Server database. Output: Currently creating Excel and PDF report output.
Firstly, you cannot assign a defaul variable value of a variable -
-DEFAULT &INPUTDATE = &YYMD
Secondly, what is happening is that the input date value being passed to your DM functions is invalid and therefore returning 0 which equates to the base date, which for WebFOCUS is 31/12/1900.
Even though your displayed output shows that the date input was 20080129 the DATEMOV and DATECVT functions consider it an invalid date. Remove the allocation of your holiday file and test the failing version to see what results you get.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
This does look a bit buggy, or maybe not supported. The issue is with the holiday file and DM.
If you take the holiday file away, the code will work, add the holiday file in and the first run will work, (ignoring the holiday file) and any subsequent run will fail until the server is restarted or the process uses a different agent.
In reporting it is fine.
Tony, I would think that using -DEFAULT &INPUTDATE = &YYMD would be acceptable with DM, though I would generally use -DEFAULT &INPUTDATE = &YYMD.EVAL Is that not legal?
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I'm sure there was a discussion on defaulting a variable to another variable. I'm sure it works in some situations, but is it documented and supported? Who knows? I'm sure Francis will chip in any moment (or at least when the sum reaches Canada ) as regards documented or not.
Myself, I've had mixed results with this type of code and many moments of sanity checking when I think "I am sure this worked last time!".
But as we all know, as time goes by the grey cells deteriorate whilst the grey hair grows. Myself I prefer to think of grey hair as a change of pigmentation
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Personnaly, I wouldn't use the -DEFAULT with another & variable. The reason is, is that after the -DEFAULT runs, in this case, the contents of &INPUTDATE is &YYMD not the contents of &YYMD. Hence the need to use .EVAL on the -SET &_RUNDATE.
I took the -DEFAULT out and ran this through using every holiday in 2008 along with several weekend days and it works just fine, every time.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
Thanks for the advice. We killed all agents using the server console and the code suddenly worked the first time we ran it. Each subsequent run fails until we kill the agent again. It also now seems to ignore our holiday file as well.
-DaveThis message has been edited. Last edited by: 3RDCC,
WebFOCUS version 761. Windows operating system. SQL Server database. Output: Currently creating Excel and PDF report output.
I'm not a believer in too many -RUN commands but if you have a situation where you have DM commands followed by WF commands followed by DM commands that make use of something created by the WF commands, then because of the way that the parsing is done, you need to put the -RUN after the WF commands so that they are executed before the second set of DM commands.
CURRENTLY DEFINED & VARIABLES STARTING WITH '_': &_INPUTDATE = &YYMD &_RUNDATE = 20080722
-DEFAULT (unlike -SET) does not perform substitution on the RHS. The &YYMD is treated as a literal.
But the .EVAL in Dave's -SET &_RUNDATE = &INPUTDATE.EVAL; makes up for that, by causing a two-stage evaluation:
The first phase (triggered by .EVAL) rewrites the statement as -SET &_RUNDATE = &YYMD; based on the character value of &INPUTDATE
The second phase executes that, and the normal operation of -SET resolves the & variable reference on the RHS -- so in effect you have (say) -SET &_RUNDATE = 20080722;
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005