Resources

Multiproject GANTT Charts (gantte23)

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: GANTTE23                                            */
/*   TITLE: Multiproject GANTT Charts (gantte23)                */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: GANTT                                               */
/*   PROCS: CPM, SORT, GANTT                                    */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 23 in the GANTT Chapter (PM User's Guide)   */
/*    MISC: Using the PATTERN variable to produce multiproject  */
/*             Gantt charts                                     */
/*                                                              */
/****************************************************************/

pattern1 c=blue   v=r5;         /* Non-critical duration  */
pattern2 c=blue   v=e;          /* Slack duration         */
pattern3 c=red    v=x5;         /* Critical duration      */
pattern4 c=black  v=s;          /* Project duration       */

data lanact;
   format act $30. succ $30. parent $20.;
   input act & succ & parent & days;
   datalines;
Measure Current Volume     Forecast Future Volume     NEEDS ASSESSMENT       2
Literature Survey          Manufacturer Demos         MARKET SURVEY          5
Determine Current Users    Forecast Future Needs      NEEDS ASSESSMENT       2
Forecast Future Volume     Prepare Network Spec       NEEDS ASSESSMENT       2
Manufacturer Demos         Identify Vendors           MARKET SURVEY          5
Forecast Future Needs      Prepare Network Spec       NEEDS ASSESSMENT       2
Identify Vendors           .                          MARKET SURVEY          2
Prepare Network Spec       .                          NEEDS ASSESSMENT       2
Prepare RFQ                Evaluate Vendor Responses  VENDOR SELECTION       4
Prepare Cable Plan         Procure Cable              SITE PREPARATION       4
Evaluate Vendor Responses  Notify Final Candidate     VENDOR SELECTION      15
Procure Cable              Install Cable              SITE PREPARATION      22
Notify Final Candidate     Negotiate Price/Config     VENDOR SELECTION       1
Install Cable              .                          SITE PREPARATION      10
Negotiate Price/Config     Prepare Purchase Order     VENDOR SELECTION       3
Prepare Purchase Order     .                          VENDOR SELECTION       1
Server Functional Spec     Server Detail Design       SPECIAL HARDWARE       5
Procure LAN Hardware       Receive Network Hardware   NETWORK INSTALLATION  25
Server Detail Design       Server Coding              SPECIAL HARDWARE      10
Receive Network Hardware   Install LAN Hardware       NETWORK INSTALLATION   4
Server Coding              Test Server Code           SPECIAL HARDWARE      10
Install LAN Hardware       Test Network               NETWORK INSTALLATION   7
Test Server Code           Install/Integrate Server   SPECIAL HARDWARE       5
Test Network               .                          NETWORK INSTALLATION   5
Install/Integrate Server   .                          SPECIAL HARDWARE       2
BEGIN PROCUREMENT          NEEDS ASSESSMENT           .                      .
BEGIN PROCUREMENT          MARKET SURVEY              .                      .
NEEDS ASSESSMENT           VENDOR SELECTION           .                      .
NEEDS ASSESSMENT           SITE PREPARATION           .                      .
MARKET SURVEY              Prepare Network Spec       .                      .
VENDOR SELECTION           NETWORK INSTALLATION       .                      .
VENDOR SELECTION           SPECIAL HARDWARE           .                      .
SITE PREPARATION           Install LAN Hardware       .                      .
NETWORK INSTALLATION       NETWORK AVAILABLE          .                      .
SPECIAL HARDWARE           NETWORK AVAILABLE          .                      .
;

proc sort data=lanact;
   by act;
   run;

proc cpm data=lanact out=lanout
     expand interval=workday date='03nov03'd;
   parent parent / wbs eso;
   activity act;
   duration days;
   successor succ;
   run;

 /* create the schedule data set with a pattern variable */
data sched;
   label wbs_code='WBS';
   label actid='Project/Activity';
   set lanout;
   if proj_lev !0 then do;
   if parent='' then _pattern=4;
      actid=act;
      do i=1 to proj_lev-1;
         actid = "   " || actid;
      end;
      output;
   end;
;

proc sort data=sched;
   by es_asc wbs_code;
   run;

 /* create the label data set */
data labels;
   _pattern=4;
   _flabel='orfont';
   _jlabel='c';
   _yoffset=0.925;
   _label='Z';
   _xvar='e_start ';
   output;
   _xvar='l_finish';
   output;
;

title1 f='Cumberland AMT' h=1.75 'Gantt Example 23';
title2 f='Cumberland AMT' h=1.25 'Displaying Summary Bars For Each Subproject';

proc gantt graphics data=sched labdata=labels;
  id actid wbs_code;
  chart / pcompress nojobnum ctext=black caxis=black
          mindate='01nov03'd maxdate='29feb04'd increment=7
          labvar=_pattern font='Cumberland AMT' height=1.5
          minoffgv=1.5 minofflv=1.5 cprec=black wprec=1
          scale=1.5 act=act succ=succ;
  run;