Chapter Contents |
Previous |
Next |
The GANTT Procedure |
PROC CPM is used to schedule the project to start on December 2, 1991. A data set named PERSONS is created containing one observation per activity per person working on that activity and a new variable named PERSON containing the name of the person to which the observation pertains. For example, this new data set contains two observations for the activity 'Write Specs', one with PERSON='Thomas' and the other with PERSON='William', and no observation for the activity 'Approve Plan' . This data set is sorted by PERSON and E_START, and displayed in Output 4.16.2. PROC GANTT is next invoked with a BY statement to obtain individual charts for each person. The resulting Gantt charts are shown in Output 4.16.3. The BY-LINE is suppressed by specifying the NOBYLINE option in an OPTIONS statement and the name of the person corresponding to the chart is displayed in the subtitle by using the #BYVAL substitution in the TITLE2 statement.
Output 4.16.1: Gantt Charts by Personstitle f=swiss 'Gantt Example 16'; proc cpm data=widgbyp date='2dec91'd; tailnode tail; duration days; headnode head; id task thomas william; run; data persons; set _last_; if william^=. then do; person='William'; output; end; if thomas^=. then do; person='Thomas'; output; end; drop thomas william; run; proc sort data=persons; by person e_start; run; title2 'Data PERSONS'; proc print data=persons; run; /* suppress byline */ options nobyline; title2 f=swiss 'Personalized Gantt Chart for #BYVAL(person)'; proc gantt data=persons; chart / pcompress font=swiss; by person; id task; run;Output 4.16.2: Gantt Charts by Persons
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.