7.6.4 Using the Calendar Manager Utility
The Calendar Manager Utility runs as part of automated processing that a job
scheduling tool such as Maestro or Unicenter AutoSys controls. The utility runs through
a shell script, using values in parameters that the install.cfg
file
contains. The utility then populates the KDD_CAL
database table with
relevant OFSBD business calendar information.
Configuring the Calendar Manager Utility
<OFSAAI Installed
Directory>/database/db_tools/mantas_cfg/install.cfg
file contains
common configuration information that Calendar Manager and other utilities require
for processing. The following sample section from the install.cfg
file provides configuration information specific to this utility, including default
numerical values in the utility’s two required
parameters.################ CALENDAR MANAGER CONFIGURATION
##################
# The look back and look forward days of the
provided date.
# These values are required to update the KDD_CAL
table. The
# maximum look back or forward is 999 days.
calendar.lookBack=365
calendar.lookForward=10
calendar.lookBack
: Determines how many days to iterate backward from the provided date during a calendar update.calendar.lookForward
: Determines how many days to iterate forward from the provided date during a calendar update.
Note:
The lookback period should be at least 90 days and as long as any events are likely to be open. The lookforward period does not must be more than 10 days. This is used when calculating projected settlement dates during data management.Note:
When you have configured the system to calculate event and case age in Business Days, the calendar date of the current system date and the calendar date of the event or case creation must be included in the calendar. As such, if you are running with a business date that is substantially behind the current system date, you should set thelookForward
parameter for the calendar manager sufficiently high to ensure that the system
date is included on the calendar. Additionally, if you have events that are open
for a very long period, you should set the lookBack
parameter
sufficiently high to include the dates of your oldest open events. If the
business calendar does not cover either of these dates, the processing reverts
to calculating age in Calendar days.
The utility connects to the database employing the user that the
utils.database.usernam
e property specifies in the
install.cfg
file.
Executing the Calendar Manager Utility
You can manage the Calendar Manager Utility as part of automated processing. You can
run the utility either inside a batch process (that is, after calling the
start_mantas_batch.sh
script) or outside a batch.
Starting the Utility Manually
- Verify that the TBAML database is
operational:
tnsping <database instance name>
- Verify that the
<OFSAAI Installed Directory>/database/db_tools/mantas_cfg/ install.cfg
configuration file contains the correct source database connection information. - Go to the directory where the shell script
resides:
cd <OFSAAI Installed Directory>/database/db_tools/bin
- Start the calendar manager shell
script:
set_mantas_date.sh YYYYMMDD
where
YYYYMMDD
is the date on which you want to base the calendar , such as20161130
for November 30, 2016. The utility then verifies that the entered date is valid and appears in the correct format.If you do not enter a date or enter it incorrectly, the utility terminates and logs a message that describes the error. The error message displays on the console only if you have output to the console enabled in the
<OFSAAI Installed Directory>/database/db_tools/mantas_cfg/ categories.cfg
configuration file.
Updating the KDD_CAL
Table
KDD_CAL_HOLIDAY
and
KDD_CAL_WKLY_OFF
database tables. It then populates the
KDD_CAL
table accordingly. That is, for each calendar name
found in the KDD_CAL_WKLY_OFF
and KDD_CAL_HOLIDAY
tables, the utility creates entries in KDD_CAL
.
Table 7-15 KDD_CAL
Table Contents
Column Name | Description |
---|---|
CLNDR_NM | Specific calendar name. |
CLNDR_DT | Date in the range between the lookback and lookforward periods. |
CLNDR_DAY_AGE |
Number of calendar days ahead or behind the provided date. The provided date has age 0, the day before is 1, the day after is –1. For example, if a specified date is 20061129, the CLNDR_DAY_AGE of 20061128 = 1, and 20061130 = –1. |
BUS_DAY_FL |
Flag that indicates whether the specified date is a valid business day (set the flag to Y). Set this flag to N if the DAY_OF_WK column contains an entry that appears as a valid non-business day in the KDD_CAL_WKLY_OFF table, or a valid holiday in KDD_CAL_HOLIDAY. |
BUS_DAY_AGE |
Number of business days ahead or behind the provided date. IfBUS_DAY_FL is N, BUS_DAY_AGE receives the value of the previous day's BUS_DAY_AGE. |
DAY_OF_WK |
Value that represents the day of the week: Sunday=1,Monday=2, Tuesday=3, ... Saturday=7. |
WK_BNDRY_CD |
Week’s start day (SD) and end day (ED).
Weeks before the provided date increment the counter, and weeks after the provided date decrement the counter. Therefore, “ED0” is always on the provided date or in the future, and “SD0” is always on the provided date or in the past. |
MNTH_BNDRY_CD |
Month’s start day (SD) and end day (ED).
Months before the provided date increment the counter, and months after the provided date decrement the counter. Therefore, “ED0” is always on the provided date or in the future, and “SD0” is always on the provided date or in the past. |
BUS_DAY_TYPE_ CD |
Indicates the type of business day:
|
SESSN_OPN_TM | Indicates the opening time of the trading session for a shortened day. The format is HHMM. |
SESSN_CLS_TM | Indicates the closing time of the trading session for a shortened day. The format is HHMM. |
SESSN_TM_OFFST_TX | Indicates the timezone offset for SESSN_OPN_TM and SESSN_CLS_TM. The format is HH:MM. |
QRTR_BNDRY_CD |
Quarter’s start day (SD) and end day (ED).
Quarters before the provided date increment the counter, and quarters after the provided date decrement the counter. Therefore, “ED0” is always on the provided date or in the future, and “SD0” is always on the provided date or in the past. |
If a batch is running, the system uses the date provided in the call to start the
set_mantas_date.sh
script. This script updates the
KDD_PRCSNG_BATCH_CONTROL.DATA_DUMP_DT
field.
Configuring Case Age
Case age can be calculated based on Business Days or Calendar Days by updating the configurable parameter set in the Installation Parameter table, from the Manage Parameters screen. (Refer to the Configuration Guide for more information).
To execute the parameter, use the following command:
run_caseage_calc.sh
This will update the KDD_CASES.age
column with age of the case,
calculated in business days or calendar days based on the configuration made in the
Installation Parameter table.