7.5.1.2 Updating the KDD_CAL Table

The Calendar Manager Utility retrieves information that it needs for updating OFSBD business calendars from the 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.

The following table provides the contents of the KDD_CAL table.

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_AGEof 20061128 = 1, and 20061130 = –1.

BUS_DAY_FL Flagt hat 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.

If BUS_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).
  • If this is the last business day for this calendar name for the week (that is, next business day has a lower DAY_OF_WK value), set to ED<x>, where <x> is a numeric counter with the start/end of the week that the provided date is in = 0.
  • If it is the first business day for this calendar name for this week (that is, previous business day has a higher DAY_OF_WK value), set to SD<x>

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).
  • If this is the last business day for this calendar name for the month (that is, next business day in a different month), set to ED<y>, where y is a numeric counter with the start/end of the month that the provided date is in = 0.
  • If it is the first business day for this calendar for this month (that is, previous business day in a different month), set to SD<y>.

    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:
  • N =Normal
  • C =Closed
  • S =Shortened
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_TMand SESSN_CLS_TM. The format is HH:MM.
QRTR_BNDRY_CD Quarter’s start day (SD) and end day (ED).
  • If this is the last business day for this calendar name for the quarter (that is, next business day in a different quarter), set ED to <y>, where y is a numeric counter with the start/end of the quarter that the provided date is in = 0.
  • If it is the first business day for this calendar name for this quarter (that is, previous business day is in a different quarter), set SD to <y>.

    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.