The GANTT Procedure |
The widget manufacturing project described in Example 6.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 "Specifying the PADDING= Option" section 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 6.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, frame fill, and text are specified using the options CMILE=, CAXIS=, CFRAME=, and CTEXT=, respectively. The global options HPOS= and VPOS= are set to 120 and 40, respectively.
options ps=60 ls=100; title 'Gantt Example 4'; title2 'Marking Milestones and Special Dates'; proc cpm data=widgett date='1dec03'd; activity task; successor succ1-succ3; duration days; id target; run; * sort the schedule by the early start date ; proc sort; by e_start; run; goptions hpos=120 vpos=40; * set up required symbol statement; symbol c=black v=plus; * plot the schedule; proc gantt; chart target / dur=days cmile=cyan ctext=blue caxis=cyan cframe=ligr; id task; run;Output 6.4.1: Marking Milestones and Special Dates in Graphics Mode
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.