Whether to Use DWMY12 or DWMYWK1 Date Macros

Choose either the #DWMY12/$DWMY12 set of macros or the #DWMYWK1/$DWMYWK1 set of macros.
micsrm140
Required roles: systems programmer, security administrator, database administrator
The effect of choosing either the #DWMY12/$DWMY12 set of macros or the #DWMYWK1/$DWMYWK1 set of macros is explained here. This information may be of particular interest to non-North American
MICS
installations.
Note:
When we talk about the "second week of a year," the meaning is different from the parameter WEEK=01, as designated in
MICS
.
Note:
The WEEKSTART parameter in MICS.PARMS(SITE) is assumed to be equal to one. For more information about the WEEKSTART option, see Complex Option Definition (CPLXDEF).
When DWMY12 Is Used
This set of date macros is the default. It provides specifications that correspond most closely to the definition of days/weeks/months typically used and understood in North America.
The determination of the calendar week of the year element (WEEK) is an integer from 1 to 54:
  • WEEK=01 begins on the first day of the calendar year and extends up to the end of the following Saturday.
  • WEEK=53 begins on the last Sunday of the calendar year and extends up to the end of that year.
See sharedprefix.MICS.DIC.TEXT(WEEK) for more details.
When a MICF query requests observations from the previous week, the date macros determine the WEEK value that corresponds to the seventh day before the query run date. Then the query selects all observations with matching WEEK values. So, when the query is run during the second week of a year (WEEK=02), query results appear to be either inaccurate or inconsistent from day to day.
For example, consider a query that is run in the second week of 2004. If the query is run on January 4, 5, 6, or 7, observations from December 28 through December 31 are selected. If the query is run on January 8, 9, or 10, observations from January 1 through January 3 are selected. So depending on the run date, query results differ.
When DWMYWK1 Is Used
This set of date macros corresponds most closely to the definition of days/weeks/months that supports various international preferences.
If you select this set of date macros, WEEK=01 begins on the Sunday of the second week of the year, if the first week has three days or less (for example, the first week in 2004). Furthermore, there are no partial weeks at year-end or year-beginning. For example, WEEK=53 can contain observations from December 28 right through to and including January 3.