Chapter Contents |
Previous |
Next |
The GANTT Procedure |
title f=swiss 'Gantt Example 8'; data holidays; format holiday holifin date7.; input holiday date8. holifin date8. holidur; datalines; 25dec91 27dec91 4 01jan92 . . ; * schedule the project subject to holidays; proc cpm data=widgeta holidata=holidays out=sched1 date='2dec91'd interval=day; tailnode tail; headnode head; duration days; id task dept descrpt; holiday holiday / holidur=(holidur); run; * sort the schedule by the early start date ; proc sort; by e_start; run; * plot the schedule; title2 'Variable Length Holidays: INTERVAL=DAY'; proc gantt holidata=holidays data=sched1; chart / holiday=(holiday) holidur=(holidur) interval=day dur=days pcompress; id task; run;Output 4.8.1: Variable Length Holidays: INTERVAL=DAY
Next, consider the same project and Holiday data set, but invoke PROC CPM with INTERVAL=WEEKDAY. Then, the value '4' specified for the variable HOLIDUR is interpreted as 4 weekdays. The holidays are on December 25, 26, 27, and 30, 1991, and on January 1, 1992, because December 28 and 29 (Saturday and Sunday) are nonworking days. The same steps are used as previously, except that INTERVAL is set to WEEKDAY instead of DAY in both PROC CPM and PROC GANTT. Suppose that the resulting data set is saved as SCHED2. The following invocation of PROC GANTT produces Output 4.8.2. Note that the use of INTERVAL=WEEKDAY causes weekends to be also marked on the chart.
title2 'Variable Length Holidays: INTERVAL=WEEKDAY'; proc gantt holidata=holidays data=sched2; chart / holiday=(holiday) holidur=(holidur) interval=weekday dur=days pcompress; id task; run;Output 4.8.2: Variable Length Holidays: INTERVAL=WEEKDAY
title2 'Variable Length Holidays: INTERVAL=WORKDAY'; proc gantt holidata=holidays data=sched3; chart / holiday=(holiday) holidur=(holidur) interval=workday dur=days mininterval=dthour markbreak mindate='30dec91:09:00:00'dt maxdate='04jan92:00:00:00'dt pcompress; id task; run;Output 4.8.3: Variable Length Holidays: INTERVAL=WORKDAY
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.