Setting Business Days and Holidays

Topics:

You can use SET commands in a procedure to determine what days are considered holidays and business days in your procedures and functions. Some of these parameters can be set in the LOCALE settings on the Web Console to apply automatically to any procedures created on the Reporting Server for which these SET parameters are not defined. For more information, see How to Change LOCALE Settings on the WebFOCUS Reporting Server.

BUSDAYS

The BUSDAYS parameter specifies which days are considered business days and which days are not if, your business does not follow the traditional Monday through Friday week.

The syntax is:

SET BUSDAYS = {week|_MTWTF_}

where:

week

Is SMTWTFS, representing the days of the week. Any day that you do not want to designate as a business day must be replaced with an underscore in the designated place for that day.

If a letter is not in its correct position, or if you replace a letter with a character other than an underscore, you receive an error message. _MTWTF_ is the default value.

HDAY

The HDAY parameter specifies the holiday file from which to retrieve dates that are designated as holidays for use with the date functions DATEDIF, DATEMOV, DATECVT, and DATEADD. The file must be named HDAY, followed by two to four characters.

To clear the holiday file, use

SET HDAY = OFF

The syntax is:

SET HDAY = xxxx

where:

xxxx

Are the letters in the name of the holiday file, named HDAYxxxx. This string must be between two and four characters long.

The default is no setting for this parameter.

WEEKFIRST

The WEEKFIRST parameter specifies a day of the week as the start of the week. This is used in week computations by the HDIFF, HNAME, HPART, HYYWD, and HSETPT functions, described in the Using Functions manual.

The HPART and HNAME subroutines can extract a week number from a date-time value. To determine a week number, they can use ISO 8601 standard week numbering, which defines the first week of the year as the first week in January with four or more days. Any preceding days in January belong to week 52 or 53 of the preceding year.

Depending on the value of WEEKFIRST, these functions can also define the first week of the year as the first week in January with seven days.

The WEEKFIRST parameter does not change the day of the month that corresponds to each day of the week, but only specifies which day is considered the start of the week.

The syntax is:

SET WEEKFIRST = {value|7}

where:

value

Can be:

1 through 7, representing Sunday through Saturday with non-standard week numbering.

or

ISO1 through ISO7, representing Sunday through Saturday with ISO standard week numbering.

Note: ISO is a synonym for ISO2.

The ISO standard establishes Monday as the first day of the week, so to be fully ISO compliant, the WEEKFIRST parameter should be set to ISO or ISO2.

WebFOCUS

Feedback