Resources

Zoned Gantt Chart (gantte25)

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: GANTTE25                                            */
/*   TITLE: Zoned Gantt Chart (gantte25)                        */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: GANTT                                               */
/*   PROCS: CPM, SORT, GANTT                                    */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 25 in the GANTT Chapter (PM User's Guide)   */
/*    MISC:                                                     */
/*                                                              */
/****************************************************************/

title h=2 'Gantt Example 25';

 /* Activity-on-Node representation of the project */
data widget;
   format task $12. succ1-succ3 $12. ;
   input task & days succ1 & succ2 & succ3 & ;
   datalines;
Approve Plan   5  Drawings      Study Market  Write Specs
Drawings      10  Prototype     .             .
Study 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 details;
   format task $12. dept $13. descrpt $30.;
   input task & dept & descrpt & ;
   label dept = "Department"
         descrpt = "Activity Description";
   datalines;
Approve Plan  Planning       Finalize and Approve Plan
Drawings      Engineering    Prepare Drawings
Study Market  Marketing      Analyze Potential Markets
Write Specs   Engineering    Write Specifications
Prototype     Engineering    Build Prototype
Mkt. Strat.   Marketing      Develop Marketing Concept
Materials     Manufacturing  Procure Raw Materials
Facility      Manufacturing  Prepare Manufacturing Facility
Init. Prod.   Manufacturing  Initial Production Run
Evaluate      Testing        Evaluate Product In-House
Test Market   Testing        Mail Product to Sample Market
Changes       Engineering    Engineering Changes
Production    Manufacturing  Begin Full Scale Production
Marketing     Marketing      Begin Full Scale Marketing
;

data widgetn;
   label task = "Activity Name";
   merge widget details;
   run;

* set up pattern statements;
pattern1 c=green v=s;    /* duration of a non-critical activity  */
pattern2 c=green v=e;    /* slack time for a noncrit. activity   */
pattern3 c=red v=s;      /* duration of a critical activity      */
pattern4 c=magenta v=e;  /* slack time for a supercrit. activity */
pattern5 c=magenta v=s;  /* duration of a supercrit. activity    */
pattern6 c=cyan v=s;     /* actual duration of an activity       */
pattern7 c=black v=e;    /* break due to a holiday               */
pattern8 c=blue v=s;     /* resource schedule of activity        */
pattern9 c=brown v=s;    /* baseline schedule of activity        */

* set graphics options;
goptions htext=1.1;

proc cpm date='01dec03'd data=widgetn;
   activity task;
   duration days;
   successor succ1 succ2 succ3;
   id dept;
   run;

proc sort;
   by dept e_start;
   run;

title2 h=1.5 'Zoned Gantt Chart';
proc gantt split='/';
   chart / pcompress scale=1 dur=days
           mindate='01dec03'd maxdate='11feb04'd
           zone=dept onezoneval czone=gray;
   id task;
   run;