The GANTT Procedure |
The GANTT procedure produces a Gantt chart, which is a graphical scheduling tool for the planning and control of a project. In its most basic form, a Gantt chart is a bar chart that plots the tasks of a project versus time. PROC GANTT displays a Gantt chart that corresponds to a project schedule such as that produced by the CPM procedure or one that is input directly to the procedure. PROC GANTT offers several options and statements for tailoring the chart to your needs.
Using PROC GANTT, you can plot the predicted early and late schedules and identify critical, supercritical, and slack activities. In addition, you can visually monitor a project in progress with the actual schedule and compare the actual schedule against a target baseline schedule. You can also graphically view the effects of scheduling a project subject to resource limitations. Any combination of these schedules can be viewed simultaneously (provided the relevant data exist) together with any user-specified variables of interest, such as project deadlines and other important dates. PROC GANTT enables you to display the early, late, and actual schedules in a single bar to produce a more meaningful schedule for tracking an activity in progress.
PROC GANTT can display the project logic on the Gantt chart by exhibiting dependencies between tasks by using directed arcs to link the related activities. You can use either the activity-on-arc (AOA) or Activity-on-Node (AON) style of input for defining the project network. In addition, the GANTT procedure recognizes nonstandard precedence types. With PROC GANTT, you can display weekends, holidays, and multiple calendars, and you can depict milestones, reference lines, and a timenow line on the chart. PROC GANTT enables you to annotate text and graphics on the Gantt chart and provides you with a wide variety of options to control and customize the graphical appearance of the chart.
The GANTT procedure also supports an automatic text annotation facility that is designed specifically for labeling Gantt charts independently of the SAS/GRAPH Annotate facility. It enables you to display label strings with a minimum of effort and data entry while providing the capability for more complex chart labeling situations. An important feature of this facility is the ability to link label coordinates and text strings to variables in the Schedule data set. This means that you can preserve the Label data set even though the schedule dates may change. Several options enable you to customize the annotation, such as the clipping of text strings that run off the page or the chart and the specification of a split character to split labels that are too long.
Using the GANTT procedure, you can produce a wide variety of Gantt charts. You can generate zoned Gantt charts with several options to control its appearance. You can display a zone variable column as well as draw a line demarcating the different zones. You can also control the bar height and bar offset of each type of schedule bar. This enables you to change the display order of the schedules as well as giving you the capability to produce a Gantt chart with embedded bars. You can override the default schedule bar pattern assignments at the activity level. In addition, you can restrict the schedule types to which the specified pattern is to be applied. You can also override the text color for selected columns of activity text at the activity level. These features facilitate the production of multiproject and multiprocess Gantt charts. Finally, you can also associate HTML pages with activity bars and create Web-enabled Gantt charts.
The GANTT procedure enables you to control the number of pages output by the procedure in both horizontal and vertical directions. In addition, you can control the number of jobs displayed per page as well as the number of tickmarks displayed per page. You can display ID variables on every page and even let the procedure display the maximum number of ID variables that can fit on one page. You can number the pages, justify the Gantt chart in the horizontal and vertical directions with respect to the page boundaries, and maintain the original aspect ratio of the Gantt chart on each page.
PROC GANTT gives you the option of displaying the Gantt chart in one of three modes: line-printer, full-screen, or graphics mode. The default mode is graphics mode, which enables you to produce charts of high resolution quality. Graphics mode requires SAS/GRAPH software. See the section Graphics Version for more information on producing high-quality Gantt charts. You can also produce line-printer quality Gantt charts by specifying the LINEPRINTER option in the PROC GANTT statement. In addition to submitting the output to either a plotter or printer, you can view the Gantt chart at the terminal in full-screen mode by specifying the FULLSCREEN option in the PROC GANTT statement. See the section Full-Screen Version for more information on viewing Gantt charts in full-screen mode. The GANTT procedure also produces a macro variable that indicates the status of the invocation and also contains other useful statistics about the Gantt charts generated by the invocation.
There are several distinctive features that characterize the appearance of the chart produced by the GANTT procedure:
The horizontal axis represents time, and the vertical axis represents the sequence of observations in the data set.
Both the time axis and the activity axis can be plotted across more than one page.
The procedure automatically provides extensive labeling of the time axis, enabling you to determine easily the exact time of events plotted on the chart. The labels are determined on the basis of the formats of the times being plotted. You can also specify user-defined formats for the labeling.
In graphics mode, the COMPRESS option in the CHART statement enables you to produce the entire Gantt chart on one page. The PCOMPRESS option enables you to produce the entire Gantt chart on one page while maintaining the original aspect ratio of the Gantt chart. Both these options work in conjunction with the HPAGES= and VPAGES= options, which specify the number of pages in the horizontal and vertical directions for the chart.
Project information is communicated into PROC GANTT using SAS data sets. The input data sets used by PROC GANTT are as follows:
The Schedule data set contains the early, late, actual, resource-constrained, and baseline schedules and any other activity-related information. The activity-related information can include precedence information, calendar used by the activity, special dates, and any other information that you want to identify with each activity. This data set can be the same as the Schedule data set produced by PROC CPM, or it can be created separately by a DATA step. Each observation in the Schedule data set represents an activity and is plotted on a separate row of the chart unless activity splitting during resource-constrained scheduling has caused an activity to split into disjoint segments. For details regarding the output format in this case, see the section Displayed Output.
The Precedence (Logic) data set contains the precedence information of the project in AON format in order to draw a Logic Gantt chart of the project. Specifying this data set is not necessary if the precedence information exists in the Schedule data set. If the data set is specified, however, the ACTIVITY variable must exist in both the Schedule and Precedence data sets.
Typically you would use this feature when scheduling in PROC CPM with nonstandard precedence constraints where the LAG variables are not transferred to the Schedule data set or with the COLLAPSE option. Setting the Precedence data set for PROC GANTT to be the Activity data set (used in PROC CPM) establishes the required precedence relationships. This is also a convenient feature when drawing several Gantt charts for the same project with different schedule information (such as when monitoring a project in progress). Specifying a Precedence data set avoids having to duplicate the precedence information in every Schedule data set.
The Label data set contains the label information of the project that enables you to draw labeled Gantt charts independently of the SAS/GRAPH Annotate facility. It requires a minimum of effort and provides you with a convenient mechanism to link label strings and their coordinates to variables in the Schedule data set. Another convenient feature is its ability to replicate labels across all activities. Both these features facilitate reuse of the Label data set.
The Workday and the Calendar data sets together enable you to represent any type of work pattern, during a week and within each day of the week, on the Gantt chart. The same Workday and Calendar data sets used by PROC CPM can also be passed to PROC GANTT.
The Holiday data set enables you to associate standard holidays and vacation periods with each calendar and represent them on the Gantt chart. Like the Workday and Calendar data sets, the same Holiday data set used by PROC CPM can also be used by PROC GANTT.
The Annotate data set contains the graphics and text that are to be annotated on the Gantt chart. This data set is used by the GANTT procedure in conjunction with the Annotate facility in SAS/GRAPH software.
The GANTT procedure produces one output data set.
The Imagemap data set contains the outline coordinates for the schedule bars used in the Gantt chart that can be used to generate HTML MAP tags.
When displaying the precedence relationships between activities on the Gantt chart, bear in mind the following facts with regard to data sets used by PROC GANTT:
The Schedule data set (and optionally the Precedence data set) contains the variables that define the precedence relationships between activities in the project.
You can handle nonstandard precedence constraints in PROC GANTT when using AON format by identifying the LAG variables in the CHART statement.
When you use PROC CPM to produce the schedule for a project with nonstandard precedence relationships, the LAG variables are not automatically included in the Schedule data set. Use an ID statement or the XFERVARS option in the PROC CPM statement to add them.
When you generate the schedule using PROC CPM with the COLLAPSE option, it is recommended that you use the Activity data set to define the precedence relationships for the Gantt procedure by specifying the PRECDATA= option in the PROC GANTT statement. This ensures that all the relevant precedence information is extracted.
Each option and statement available in the GANTT procedure is explained in the section Syntax: GANTT Procedure. The section Examples: GANTT Procedure illustrates most of these options and statements.
Copyright © SAS Institute, Inc. All Rights Reserved.