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.
Hello, I am trying to make a holiday file for a daydiff function. Looking through the posts here in focal point, I have gotten as far as making my file and putting it in: ibi\srv76\wfs\bin\HDAYDOFF.ERR
The contents of that file are as follows: 20090101 20090119 20090410 20090525 20090703 20090907 20091126 20091221 20091222 20091223 20091224 20091225
However, when I run this code: SET HDAY = DOFF SET BUSDAYS = SMTWTFS -RUN
TABLE FILE CAR PRINT COUNTRY COMPUTE DAT1/YYMD = 20091201 ; COMPUTE DAT2/YYMD = 20091231 ; COMPUTE DTDIFF/I2 = DATEDIF(DAT1, DAT2, 'BD'); END
The output is 30 days difference. It should be 25 since the 21st through the 25th of December is in my holiday file.
Now, when I run this code, just to test to see if WF even recognizes the file: SET HDAY = DOFF -RUN
I get this message: (FOC1892) FILE NOT FOUND : HDAYDOFFERRORS *
Can anyone help me figure out how I can get a holiday file to work? Thank you!This message has been edited. Last edited by: Kerry,
The location and name of your file looks correct, the SET command looks correct - you MAY need a -RUN right after the SET HDAY command for it to be applied before the SET BUSDAYS command.
The following commands lets you know if the SET HDAY command worked:
SET HDAY = DOFF
-RUN
-? SET HDAY &VARHDAY
-RUN
-TYPE &VARHDAY
-? SET HDAY &VARHDAY puts the value of the HDAY setting in a variable called &VARHDAY. If the result of the -TYPE command is blank, then the SET HDAY command did not work.
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
I ran your exact code on my environment (which today is windows xp based) and there it runs without any problem, and gives me the correct number of days (25). My release level is 767.
It may be that the older release has problems with the file being uppercase. Try to change the name to all lowercase and see if that helps.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Thank you for your help. However, I still cannot get WF to recognize the file. When I ran your code, Francis, I got the same error message: (FOC1892) FILE NOT FOUND : HDAYDOFFERRORS *
Changing to lowercase did not work either. BTW - I have 767 on Windows XP professional. I have not updated my profile, yet.
Is a .err file different from a regular .txt file? I made my holday file using a new text document and saved it with an extension of .err. Did I do something wrong there?
TomP - can you expand a little bit on what you mean when you say "Search for HOLIDAY FILE".
One more thing I found out... when I do a search in Windows Explorer for filenames with .err, all of the .err files have a type of "ERR File" except for the one I created has a file type of "Text Document", even though the extension is .err. How can I fix this? Thanks!
Also, all of the other .err files are in srv76\home\nls
I think I fixed it. What I did was that I went into the file location where all of the other .err files were. I copied one and edited it with notepad erasing what was in there and putting in my dates. Then I ran Francis' code again and the result was: DOFF
Then I ran my original code and got a 25 day difference!!! Yeah!!!!
BTW - the file location that worked for me was: ibi\srv76\home\nls
This may seems like a stupid question, but are you doing this on the localhost srv76/wfs/bin subdirectory or did you put the file on the 'real' WebFOCUS reporting server bin directory?
all of the .err files have a type of "ERR File" except for the one I created has a file type of "Text Document"
To me, this is the give away statement and I would lay money on the fact that you've file extensions hidden for known file types?
When you saved your file from within your text editor and gave it the filename hdaydoff.err (what you thought was an extension), i would guess that it actually saved the file hdaydoff.err.txt. When you have looked at it in explorer allyou've seen is hdaydoff.err.
WebFOCUS wouldn't have used a file of that name because the extension was wrong, the .err is treated as part of the filename.
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
You are probably right, Tony. I have done that before by accident. So, what is the easiest way to create a .err file then? You open a new text document... then what?
From windows explorer, I usually right click and create new text file and change the name and extension as required. Then I open it with my favorite editor. Each to their own method, but it works for me.
T
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004