The GANTT Procedure

 
Multiple Calendars and Holidays

Work pertaining to a given activity is assumed to be done according to a particular calendar. A calendar is defined in terms of a work pattern for each day and a workweek structure for each week. In addition, each calendar may include holidays during the year. See the "Multiple Calendars" section in the PROC CPM chapter for details on how calendars are defined and how all the options work together. In this chapter, a less detailed description is provided. PROC GANTT uses the same structure as PROC CPM for defining calendars, but the options for using them differ in minor ways. The following are the differences in syntax:

  • The CALID variable is specified as an option in the CHART statement and is not a separate statement as in PROC CPM.

  • The HOLIDAY variable is specified as an option in the CHART statement and is not a separate statement as in PROC CPM.

  • The HOLIDUR and HOLIFIN variables are specified as options in the CHART statement and not in a separate HOLIDAY statement.

  • The INTERVAL= option is specified in the CHART statement and not in the procedure statement as in PROC CPM.

The WORKDATA (or Workday) data set specifies distinct shift patterns during a day. The CALEDATA (or Calendar) data set specifies a typical workweek for all the calendars in the project; for each day of a typical week, it specifies the shift pattern that is followed. The HOLIDATA (or Holiday) data set specifies a list of holidays and the calendars that they refer to; holidays are defined either by specifying the start of the holiday and its duration in interval units, where the INTERVAL= option has been specified as interval, or by specifying the start and end of the holiday period. If both the HOLIDUR and the HOLIFIN variables have missing values in a given observation, the holiday is assumed to start at the date and time specified for the HOLIDAY variable and last one unit of interval. If a given observation has valid values for both the HOLIDUR and the HOLIFIN variables, only the HOLIFIN variable is used so that the holiday is assumed to start and end as specified by the HOLIDAY and HOLIFIN variables, respectively. The Schedule data set (the DATA= data set) , specifies the calendar that is used by each activity in the project through the CALID variable (or a default variable _CAL_). Each of the three data sets used to define calendars is described in greater detail in the "Multiple Calendars" section in the PROC CPM chapter.

Each new value for the CALID variable in either the Calendar or the Holiday data set defines a new calendar. If a calendar value appears in the Calendar data set and not in the Holiday data set, it is assumed to have the same holidays as the default calendar (the default calendar is defined in the PROC CPM chapter). If a calendar value appears in the Holiday data set and not in the Calendar data set, it is assumed to have the same work pattern structures (for each week and within each day) as the default calendar. In the Schedule data set, valid values for the CALID variable are those that are defined in either the Calendar or the Holiday data set.

All the holiday, workday and workweek information is used by PROC GANTT for display only; in particular, the weekend and shift information is used only if the MARKWKND or MARKBREAK option is in effect. The value of the INTERVAL= option, which has a greater scope in PROC CPM, is used here only to determine the end of holiday periods appropriately. Further, the Workday, Calendar, and Holiday data sets and the processing of holidays and different calendars are supported only when interval is DAY, WEEKDAY, WORKDAY, DTSECOND, DTMINUTE, DTHOUR, DTDAY, or DTRKDAY.

Specifying the INTERVAL= Option

The INTERVAL= option is needed only if you want holidays or breaks or both during a week or day to be indicated on the Gantt chart. The value of INTERVAL= is used to compute the start and end of holiday periods to be compatible with the way they were computed and used by PROC CPM. Further, if the MARKWKND or MARKBREAK option is in effect, the INTERVAL= option, in conjunction with the DAYSTART= and DAYLENGTH= options and the Workday, Calendar, and Holiday data sets, helps identify the breaks during a standard week or day as well as the holidays that are to be marked on the chart. Valid values of interval are DAY, WEEKDAY, WORKDAY, DTSECOND, DTMINUTE, DTHOUR, DTDAY, and DTWRKDAY. If interval is WEEKDAY, WORKDAY, or DTWRKDAY, the MARKWKND option is in effect; otherwise, breaks during a week are indicated only if MARKWKND is specified and breaks within a day are marked only if MARKBREAK is specified.