Using the CHARTWIDTH= Option (gantt27)
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: GANTT27 */
/* TITLE: Using the CHARTWIDTH= Option (gantt27) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: GANTT */
/* PROCS: CPM, GANTT */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 27 in the GANTT Chapter (PM User's Guide) */
/* MISC: */
/* */
/****************************************************************/
data widgaoa;
format task $12.;
input task & days tail head;
datalines;
Approve Plan 5 1 2
Drawings 10 2 3
Study Market 5 2 4
Write Specs 5 2 3
Prototype 15 3 5
Mkt. Strat. 10 4 6
Materials 10 5 7
Facility 10 5 7
Init. Prod. 10 7 8
Evaluate 10 8 9
Test Market 15 6 9
Changes 5 9 10
Production 0 10 11
Marketing 0 6 12
Dummy 0 8 6
;
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
Dummy . Production Milestone
;
data widgeta;
merge widgaoa details;
run;
* schedule the project;
proc cpm data=widgeta date='1dec03'd out=save;
tailnode tail;
headnode head;
duration days;
id task dept descrpt;
run;
* sort the schedule by the early start date ;
proc sort;
by e_start;
run;
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 */
title h=2 'Gantt Example 27';
title2 h=1.5 'MINDATE=1jan04';
proc gantt data=save;
chart / mindate='1jan04'd maxdate='1feb04'd
dur=days nojobnum compress height=2.0
ref='2jan04'd to '2feb04'd by week
reflabel;
id descrpt;
run;
title h=2 'Gantt Example 27';
title2 h=1.5 'MINDATE=15aug03';
proc gantt data=save;
chart / mindate='15aug03'd maxdate='1feb04'd
dur=days nojobnum compress height=2.0
ref='16aug03'd to '2feb04'd by week
reflabel;
id descrpt;
run;
title h=2 'Gantt Example 27';
title2 h=1.5 'MINDATE=1jan04, CHARTWIDTH=75';
proc gantt data=save;
chart / mindate='1jan04'd maxdate='1feb04'd
dur=days nojobnum compress height=2.0
ref='2jan04'd to '2feb04'd by week
reflabel chartwidth=75;
id descrpt;
run;
title h=2 'Gantt Example 27';
title2 h=1.5 'MINDATE=15aug03, CHARTWIDTH=75';
proc gantt data=save;
chart / mindate='15aug03'd maxdate='1feb04'd
dur=days nojobnum compress height=2.0
ref='16aug03'd to '2feb04'd by week
reflabel chartwidth=75;
id descrpt;
run;