Chapter Contents |
Previous |
Next |
The GANTT Procedure |
Next, the GANTT procedure is invoked with the specification of HOLIDATA=HOLIDAYS in the PROC GANTT statement and the HOLIDAY= and HOLIEND= options in the CHART statement, causing the Christmas and New Year holidays to be marked on the chart. Note that the procedure marks the duration of the holiday with the pattern corresponding to the seventh PATTERN statement. The HPAGES= option is used to fit horizontal span of the chart on one page. The SIMPLEX font is used for all text by specifying the FONT= option in the CHART statement.
options ps=60 ls=100; title 'Gantt Example 3'; title2 'Marking Holidays'; /* Activity-on-Node representation of the project */ data widget; input task $ 1-12 days succ1 $ 19-30 succ2 $ 33-44 succ3 $ 47-58; datalines; Approve Plan 5 Drawings Anal. Market Write Specs Drawings 10 Prototype Anal. Market 5 Mkt. Strat. Write Specs 5 Prototype Prototype 15 Materials Facility Mkt. Strat. 10 Test Market Marketing Materials 10 Init. Prod. Facility 10 Init. Prod. Init. Prod. 10 Test Market Marketing Evaluate Evaluate 10 Changes Test Market 15 Changes Changes 5 Production Production 0 Marketing 0 ; 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=widget holidata=holidays out=saveh date='2dec91'd ; activity task; succ succ1 succ2 succ3; duration days; holiday holiday / holifin=(holifin); run; * sort the schedule by the early start date ; proc sort; by e_start; run; * print the schedule; proc print data=saveh; var task days e_start e_finish l_start l_finish t_float f_float; run; * plot the schedule; proc gantt holidata=holidays data=saveh; chart / holiday=(holiday) holiend=(holifin) hpages=1 font=simplex; id task; run;Output 4.3.1: Marking Holidays
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.