Using Automatic Text Annotation Facility (gantte22)
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: GANTTE22 */
/* TITLE: Using Automatic Text Annotation Facility (gantte22) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: GANTT */
/* PROCS: CPM, SORT, GANTT */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 22 in the GANTT Chapter (PM User's Guide) */
/* MISC: Using the Automatic Text Annotation Facility */
/* to label a Gantt chart depicting a */
/* Steam Calendar Maintenance Schedule */
/* */
/****************************************************************/
title c=black 'Gantt Example 22';
data shutdown;
input act succ id & $20. dur;
datalines;
1100 1110 Start Project 0
1110 1120 Procure Pipe 10
1120 1130 Prefab Pipe Sections 5
1130 1140 Deactivate Calender 0
1140 1150 Position New Pipe 1
1150 1160 Start Disassembly 0
1160 1170 Disassemble Calender 2
1170 1200 Finish Disassembly 0
1200 1300 Repair Calender 10
1300 1310 Start Assembly 0
1310 1320 Reassemble Calender 3
1320 1330 Finish Assembly 0
1330 1340 Connect Pipes 2
1340 1350 Adjust and Balance 1
1350 1360 Activate Calender 0
1360 1370 System Testing 1
1370 . Finish Project 0
;
proc cpm data=shutdown date='01jun04'd interval=day
out=sched;
act act;
succ succ;
dur dur;
id id;
run;
data labels;
input act _y _xvar $ _lvar $ _yoffset _xoffset _label & $25.
_alabel _hlabel _jlabel $ _flabel $ _clabel $;
datalines;
. -1 e_start act -.3 0 . 0 1.5 . . .
. -1 e_start id 2.3 0 . 0 1.5 . . .
1130 . e_start . 1.5 -1 N 90 2 L orfont .
1350 . e_finish . 1.5 5 M 90 2 L orfont .
1200 17 e_start . 2.5 1 Start Maintenance Period 90 2 . . .
1200 17 e_finish . 2.5 .5 Finish Maintenance Period 90 2 . . .
1200 1 e_start . . -6 Shutdown 0 3 R . .
1200 1 e_start . . 2 Maintenance 0 3 L . .
1200 1 e_finish . . 6 Start-Up 0 3 L . .
;
* 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 */
title2 'Automatic Text Annotation Example';
proc gantt data=sched labdata=labels graphics maxdec=0;
chart / pcompress nolegend nojobnum dur=dur
mininterval=day scale=5 skip=3 maxdate='14jul04'd
labvar=act labsplit='/' ref='19jun04'd '29jun04'd
height=1.5 lref=20;
run;