The GANTT Procedure

Example 8.4 Marking Milestones and Special Dates

The widget manufacturing project described in Example 8.3 has two activities with zero duration, namely 'Production' and 'Marketing.' By default, PROC GANTT pads finish times by a padding unit, thus these two activities are represented on the Gantt chart as having a duration equal to one day (see the section Specifying the PADDING= Option for further information on padding). In other words, based on start and finish times alone, PROC GANTT cannot distinguish between activities that are one day or zero days long; it needs knowledge of the activity duration variable, which is specified using the DUR= option in the CHART statement, in order to represent zero duration activities by a milestone symbol.

Now, suppose that the Engineering department would like to finish writing up the specifications before Christmas and have the prototype ready by mid-January. In addition, the Marketing department would like to develop a marketing concept by the year’s end. The data set, TARGET, contains the target dates for these activities. This data set is merged with the WIDGET data set to produce the WIDGETT data set. The WIDGETT data set is then input to the CPM procedure, which is invoked with an ID statement to ensure that the variable TARGET is passed to the Schedule data set. After sorting the Schedule data set by the early start time, PROC GANTT is used to produce a Gantt chart of the resulting schedule. The Gantt chart is shown in Output 8.4.1.

Before invoking PROC GANTT, you specify the required symbol using a SYMBOL statement. Specifying the variable TARGET in the CHART statement causes target dates to be marked on the chart with the symbol specified in the SYMBOL statement, a PLUS symbol in black. Specifying the DUR= option in the CHART statement causes zero duration schedules to be represented on the chart by the default milestone symbol, a filled diamond. To use a different milestone symbol, use the FMILE= and VMILE= options in the CHART statement. The duration and slack time of the activities are indicated by the use of the appropriate fill patterns as explained in the legend.

Colors for the milestone, axis, and text are specified using the options CMILE=, CAXIS=, and CTEXT=, respectively.

options ps=60 ls=100;

title h=2.5 'Gantt Example 4';
title2 h=1.5 'Marking Milestones and Special Dates';
proc cpm data=widgett date='1dec03'd;
   activity task;
   successor succ1-succ3;
   duration days;
   id target;

* sort the schedule by the early start date ;
proc sort;
   by e_start;

goptions htext=1.1 hpos=110 vpos=40;

* set up required pattern and symbol statements;
pattern1 c=green v=s;
pattern2 c=green v=e;
pattern3 c=red   v=s;
symbol   c=black v=plus;

* plot the schedule;
proc gantt;
   chart target / dur=days cmile=cyan
                  ctext=blue caxis=cyan;
   id task;

Output 8.4.1: Marking Milestones and Special Dates in Graphics Mode

Marking Milestones and Special Dates in Graphics Mode
External File:images/ga04_1.png