Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The GANTT Procedure

Getting Started

In order to draw a Gantt chart, at the very minimum, you need a Schedule data set. This data set is expected to be similar to the OUT= Schedule data set produced by PROC CPM, with each observation representing an activity in the project. It is possible to obtain a detailed Gantt chart by specifying the single statement

PROC GANTT DATA= SASdataset ;

where the data set specified is the Schedule data set produced by PROC CPM.

As an example of this, consider the software development project in the "Getting Started" section in Chapter 2 "The CPM Procedure." The output schedule for this example is saved in a data set, INTRO1, which is displayed in Figure 4.1.

Project Schedule

Obs activity succesr1 succesr2 duration descrpt E_START E_FINISH L_START L_FINISH T_FLOAT F_FLOAT
1 TESTING RECODE   20 Initial Testing 01MAR92 20MAR92 01MAR92 20MAR92 0 0
2 PRELDOC DOCEDREV QATEST 15 Prel. Documentation 01MAR92 15MAR92 11MAR92 25MAR92 10 10
3 MEETMKT RECODE   1 Meet Marketing 01MAR92 01MAR92 20MAR92 20MAR92 19 19
4 RECODE DOCEDREV QATEST 5 Recoding 21MAR92 25MAR92 21MAR92 25MAR92 0 0
5 QATEST PROD   10 QA Test Approve 26MAR92 04APR92 26MAR92 04APR92 0 0
6 DOCEDREV PROD   10 Doc. Edit and Revise 26MAR92 04APR92 26MAR92 04APR92 0 0
7 PROD     1 Production 05APR92 05APR92 05APR92 05APR92 0 0

Figure 4.1: Software Project Plan

The following code produces the Gantt chart shown in Figure 4.2.

   proc gantt lineprinter data=intro1;
   run;

The DATA= option could be omitted if the INTRO1 data set is the most recent data set created; by default, PROC GANTT uses the _LAST_ data set.

Line-Printer Gantt Chart

                MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR MAR APR APR APR         
         Job    01  03  05  07  09  11  13  15  17  19  21  23  25  27  29  31  02  04  06          
               -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-          
               |                                                                         |          
           1   |*=======================================*                                |          
               |                                                                         |          
           2   |<-------------------<--------->...................>                      |          
               |                                                                         |          
           3   |<->...................................<.>                                |          
               |                                                                         |          
           4   |                                        *=========*                      |          
               |                                                                         |          
           5   |                                                  *===================*  |          
               |                                                                         |          
           6   |                                                  *===================*  |          
               |                                                                         |          
           7   |                                                                      *=*|          
               |                                                                         |          
               -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-          
                                                                                                    
                                                                                                    
                                              LEGEND                                                
                                                                                                    
                                                                                                    
                              Symbol     Explanation                                                
                                                                                                    
                              <---->     Duration of a Normal Job                                   
                                                                                                    
                              >....>     Slack Time for a Normal Job                                
                                                                                                    
                              *====*     Duration of a Critical Job                                 
                                                                                                    

Figure 4.2: Line-Printer Gantt Chart

You can produce a high-resolution graphics quality Gantt chart by specifying the GRAPHICS option instead of the LINEPRINTER option in the PROC GANTT statement. Graphics mode is also the default display mode. The resulting Gantt chart is shown in Figure 4.3.

   proc gantt graphics data=intro1;
   run;

gaovw2.gif (3974 bytes)

Figure 4.3: Graphics Gantt Chart

Finally, you can draw a Logic Gantt chart by defining the precedence information to PROC GANTT via AON format using the ACTIVITY= and SUCCESSOR= options in the CHART statement. The Logic Gantt chart is shown in Figure 4.4.

   proc gantt data=intro1;
      chart / activity=activity successor=(succesr1-succesr2);
   run;

gaovw3.gif (4249 bytes)

Figure 4.4: Logic Gantt Chart

For further examples illustrating typical invocations of the GANTT procedure when managing projects, see Chapter 1 "Introduction to Project Management."

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.