The Microsoft Project Conversion Macros |
In this example, a project is scheduled subject to resource constraints.
Before you continue, make sure that in your Microsoft Project software, "resource leveling" is properly set as follows so that the resource-constrained schedule is automatically displayed in the Gantt chart. From the Microsoft Project Tools menu, select Level Resources (Resource Leveling in Microsoft Project 2000). Then select Automatic for Leveling calculations. Clear Level only within available slack for Resolving overallocations. Then click on OK.
The following DATA steps specify the project in this example. Resource assignments are specified in the data set Activity, and the resource availabilities are defined in the data set Resources.
data activity; format task succ1 $8.; input task dur succ1 engineer writer tester; datalines; Design 5 Develop 1 . 1 Develop 10 Document 1 . 1 Develop 10 Test 1 . 1 Document 6 Ship 1 1 . Test 8 Ship 1 . 1 Ship 0 . . . . ;
data resources; format obstype $8.; input obstype date: date7. engineer writer tester; datalines; reslevel 15Dec06 . . 1 reslevel 18Dec06 1 . . reslevel 30Dec06 . 1 . ;
proc pm data=activity date='15Dec06'd resin=resources; act task; succ succ1; duration dur; resource engineer writer tester / period=date; run;
Figure 4.17: PM Window
To convert the data to an MDB file that includes resource requirements, you use
the following call to %SASTOMSP:
filename mspref "c:\msproj\sasmsp4a.mdb"; %sastomsp(mdbfile=mspref, resds=resources, _activity=task, _date='15Dec06'd, _resobstype=obstype, _resource=engineer writer tester, _resperiod=date);
Figure 4.18: MS Project Window
In Figure 4.18, Microsoft Project displays only the resource-constrained schedule.
To get a comparison view as in the PM procedure, you can save the output schedule of the
PM procedure and specify the SCHEDULEDS= parameter in the call to %SASTOMSP,
as follows:
proc pm data=activity date='15Dec06'd resin=resources out=schedule; act task; succ succ1; duration dur; resource engineer writer tester / period=date; run;
filename mspref "c:\msproj\sasmsp4b.mdb"; %sastomsp(mdbfile=mspref, resds=resources, scheduleds=schedule, _activity=task, _date='15Dec06'd, _resobstype=obstype, _resource=engineer writer tester, _resperiod=date);
You can manually set Microsoft Project to display the schedules in the
Gantt Chart. In Microsoft Project, from the Format menu, select
Bar Styles. Then change the
Task number in the column Row from 1
to 2. Click on Insert Row. Type a name for the
new row (e.g., SAS Early Schedule). Under
From, select Start1 (SAS_E_start ). Under To, select Finish1 (
SAS_E_finish ). Click OK. The resulting window is
shown in Figure 4.19. Now both the resource-constrained
schedule and the early schedule are displayed in the Gantt chart.
Figure 4.19: MS Project Window
You can also display the SAS_E_start and the SAS_E_finish in columns by going to the Insert menu, selecting Column, and selecting the Start1 (SAS_E_start ) and Finish1 (SAS_E_finish ) fields.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.