If your accounting calendar corresponds to your CA MICS calendar, your accounting calendar is defined automatically and you can skip this section. If your accounting calendar does NOT correspond to your CA MICS calendar, you can define your accounting calendar using the Accounting Calendar online panels as discussed in Section 4.6.3. This section is only for those persons that prefer to define their accounting calendar using macros instead of the panels. Figure 4-59 is the Accounting Calendar Macros Worksheet:
+----------------------------------------------------------------------------------------------------------+ | | | Date: ____/____/____ Administrator: ____________________________________________ | +----------------------------------------------------------------------------------------------------------+ ACCOUNTING CALENDAR MACROS WORKSHEET SAS Statements: _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _____________________________________________________________________________________________________ _________________________________________________________________________________________________________________________________
Figure 4-59. Accounting Calendar Macros Worksheet
Description: Code the SAS routines to assign values to
the ACTDAY, ACTWEEK, ACTMONTH, and ACTYEAR variables
according to your calendar. Testing and maintaining
these routines is your responsibility.
Default: None
Values: See the following NOTE:
NOTE: The following are samples of macro routines for
each of the three cases defined in Section 4.6:
FINANCIAL YEAR-MONTH CORRESPONDS TO CALENDAR
YEAR-MONTH
The default macros shipped with CA MICS
Accounting and Chargeback Option set the
accounting date variables to the corresponding CA
MICS calendar date variables. The actual
contents of the macros are listed below:
%MACRO ADAY;
ACTDAY = DAY;
%MEND ADAY;
%MACRO AWEEK;
ACTWEEK = WEEK;
%MEND AWEEK;
%MACRO AMONTH;
ACTMONTH = MONTH;
%MEND AMONTH;
%MACRO AYEAR;
ACTYEAR = YEAR;
%MEND AYEAR;
ACCOUNTING MONTHS CORRESPOND TO CALENDAR MONTHS
For example, if the fiscal year begins on July 1
and ends on June 30, but the corresponding months
have the same number of days, the following
routines could be used to set the accounting date
variables:
%MACRO ADAY;
ACTDAY = DAY;
%MEND ADAY;
%MACRO AWEEK;
ACTWEEK = WEEK;
%MEND AWEEK;
%MACRO AMONTH;
WRKMONTH = MONTH(DATEPART(ENDTS));
IF WRKMONTH LT 7 THEN ACTMONTH = WRKMONTH + 6;
ELSE ACTMONTH = WRKMONTH - 6;
%MEND AMONTH;
%MACRO AYEAR;
WRKYEAR = YEAR(DATEPART(ENDTS));
IF MONTH(DATEPART(ENDTS)) LT 7 THEN
ACTYEAR = WRKYEAR - 1900;
ELSE ACTYEAR = WRKYEAR - 1899;
%MEND AYEAR;
ACCOUNTING MONTHS DIFFER FROM CALENDAR MONTHS
If there is little correspondence between
calendar dates and accounting dates, we recommend
that you use the accounting calendar to sequence
all CA MICS files.
You can revise the standard _DAY, _MONTH, and
_YEAR Macros for all of the CA MICS files by
specifying the 13MONTHYEAR option in
prefix.MICS.PARMS(SITE). This method is referred
to as the Thirteen Month Fiscal Year Option and
is documented in Section 2.3.2.4 of the PIOM.
NOTE: Implementing this change on an existing CA MICS
system is likely to cause previous WEEKS and
MONTHS cycles to contain different amounts of
data than those created following the change.
You must take this into consideration when doing
capacity planning, auditing, or any other process
that requires historical information.
EXAMPLE
In the example shown in Figure 4-60, accounting months
correspond to calendar months, but the fiscal year begins on
July 1 and ends on June 30.
_____________________________________________________________
+-----------------------------------------------------------+
| Date: __/__/__ Administrator: _________ |
+-----------------------------------------------------------+
%MACRO ADAY;
ACTDAY = DAY;
%MEND ADAY;
%MACRO AWEEK;
ACTWEEK = WEEK;
%MEND AWEEK;
%MACRO AMONTH;
WRKMONTH = MONTH(DATEPART(ENDTS));
IF WRKMONTH LT 7 THEN ACTMONTH = WRKMONTH + 6;
ELSE ACTMONTH = WRKMONTH - 6;
%MEND AMONTH;
%MACRO AYEAR;
WRKYEAR = YEAR(DATEPART(ENDTS));
IF MONTH(DATEPART(ENDTS)) LT 7 THEN
ACTYEAR = WRKYEAR - 1900;
ELSE ACTYEAR = WRKYEAR - 1899;
%MEND AYEAR;
_____________________________________________________________
Figure 4-60. Accounting Calendar Macros Example
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |