book
Article ID: KB0071340
calendar_today
Updated On:
Description
The HDAY function is used to identify whether a day is a workday or a holiday. Any day marked as a holiday will be excluded from the counting.
Resolution
To create a holiday file please follow the below rules.
- The file name should start with HDAY and then any four characters.
- The file extension should be .ERR
- Dates must be in YYMD format.
- Dates must be in ascending order.
- Each date must be on a new line.
First, we need to create a file that has the details of the holidays.
Example.
19911225 CHRISTMAS
like this you need to add in a simple txt file; then you need to save that file with a name like HDAYabcd.err.
Once you created the HDAY file then you need to use this file in your code.
- You can set this HDAY file in your code with the help of the set command,
example - SET HDAY = abcd
where abcd is the next four characters from the file name ( HDAYabcd.err).
Example- Creating and selecting the Holiday file
Below is the HDAYabcd.err file which has the details about the holidays.
The following sets HDAYabcd.ERR as the holiday file and uses HDAYabcd in its calculations:
And below is the output in which it is excluding the 25th and returning the 26th as the next working day.
Issue/Introduction
This article gives you an idea how you can create a Holiday file in WebFOCUS