Previous Topic: 4.6.3 Document Program Documentation

Next Topic: 4.7.1 Calendar Support Macro Descriptions

4.7 Calendar Derivations


CA MICS calendar derivation routines reside in the
sharedprefix.MICS.SOURCE library.  The major calendar types
that can be implemented in CA MICS are the 12 month, 13
month, and 445/454/544 calendar, where the latter
describes the number of weeks per month in each calendar
quarter.

Note:  The CA MICS Accounting and Chargeback Product includes
       facilities for defining a unique accounting calendar
       separate from the global CA MICS calendar definitions.
       This capability is designed to help you meet your
       requirements for chargeback and accounting relative to
       your company's fiscal calendar while continuing to use
       the standard 12-month calendar for the majority of
       your CA MICS information.  See the CA MICS Accounting
       and Chargeback Guide for more information before
       altering the global CA MICS calendar.

Depending on the type of calendar being used, the source
member name may be #DWMY12 ($DWMY12), #DWMY13 ($DWMY13),
#DWMYWK1 ($DWMYWK1), or any other 8-character name as
specified by the 13MONTHYEAR parameter in
sharedprefix.MICS.PARMS(CPLXDEF) or prefix.MICS.PARMS(SITE).
Determine the member currently being used for your CA MICS
system before attempting modification.  For information on
the 13MONTHYEAR parameter, see the PIOM, Sections 2.3.1.8 and
2.3.2.4.

Regardless of the type of calendar being used, whether it is
12 or 13-month based, the purpose of the source member is to
define the derivations for the CA MICS data elements DAY,
WEEK, MONTH, and YEAR.  The derivations are defined as SAS
macros which are called at various points during CA MICS
execution.

Currently, the macros are shipped in two styles:  the Macro
statement and the Macro language.  The ones defined in Macro
statement reside in the #DWMYnn members, while the
corresponding Macro language definitions reside in the
$DWMYnn members.  It is necessary to maintain both styles of
macros for compatibility.  Therefore, if you have made or
plan to make modifications to the #DWMYnn members, the same
modifications must also be applied to the $DWMYnn members.

The operation and logic of the two members are identical.
What is different is that the $DWMY12 member, written in SAS
Macro language, has the macros defined with a %MACRO
macroname--%MEND macroname style rather than the underscore
and % style used in the older SAS Macro statements.

The macro invocation of the newer style (as in $DWMY12) SAS
Macro language macros is done by %macroname rather than
_macroname used in the old style (as in #DWMY12).

If you do not utilize the #DWMYnn members at all, but instead
have coded your own calendar derivation member in
sharedprefix.MICS.SOURCE, then that member must contain the
macro definitions in both styles.  For example, the member
must contain the MACRO _YEAR ....  % and the %MACRO YEAR; ...
%MEND YEAR; definitions.  Notice that the Macro language
style names do not start with an underscore (_).

    SPECIAL NOTE:  Calendar data element derivations are very
    critical to the proper operation of the CA MICS database.
    If you intend making any modifications to standard
    CA MICS calendar derivations, read this entire section
    first.  Backup your databases and libraries before
    implementing the change, and test each modification
    thoroughly.