Resources

Summarizing the Schedule (intpme04)

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: INTPME04                                            */
/*   TITLE: Summarizing the Schedule (intpme04)                 */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS:                                                     */
/*   PROCS: CPM, GANTT                                          */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 4 from the chapter, Introduction to Project */
/*           Management.                                        */
/*    MISC: Conducting a Market Survey: Summarized Schedule     */
/*                                                              */
/****************************************************************/

data survey;
   input id        $ 1-20
         activity  $ 22-29
         duration
         succ1     $ 34-41
         succ2     $ 43-50
         succ3     $ 52-59
         phase     $ 61-69;
   label phase = 'Project Phase'
         id    = 'Description';
   datalines;
Plan Survey          plan sur 4  hire per design q          Plan
Hire Personnel       hire per 5  trn per                    Prepare
Design Questionnaire design q 3  trn per  select h print q  Plan
Train Personnel      trn per  3  cond sur                   Prepare
Select Households    select h 3  cond sur                   Prepare
Print Questionnaire  print q  4  cond sur                   Prepare
Conduct Survey       cond sur 10 analyze                    Implement
Analyze Results      analyze  6                             Implement
;

data holidata;
   format hol date7.;
   hol = '4jul03'd;
run;

proc cpm data=survey date='1jul03'd out=survschd
         interval=weekday holidata=holidata;
   activity   activity;
   successor  succ1-succ3;
   duration   duration;
   id         id phase;
   holiday    hol;
   run;

proc sort data=survschd;
   by phase;
   run;

proc summary data=survschd;
   by phase;
   output out=sumsched min(e_start)= max(e_finish)= ;
   var e_start e_finish;
   run;

proc sort data=sumsched;
   by e_start;
   format e_start e_finish date7.;
   run;

pattern1 c=green v=s;
pattern2 c=green v=e;
pattern3 c=red   v=s;
pattern4 c=magenta v=e;
pattern5 c=magenta v=s;
pattern6 c=cyan v=s;
pattern7 c=black v=e;

goptions hpos=80 vpos=43;

title c=black h=3 'Conducting a Market Survey';
title2 c=black h=2 'Summarized Schedule';

proc gantt data=sumsched graphics
     holidata=holidata;
   id phase;
   chart / nojobnum
           nolegend
           interval=weekday
           height=2.0 skip=4
           ref='01jul03'd to '15aug03'd by week
           caxis=black
           cref=gray
           holiday=(hol);
   run;