The Microsoft Project Conversion Macros |
This example demonstrates how to convert a simple project from SAS to Microsoft Project. The data set Activity is created using the following SAS DATA step:
data activity; format activity succ1 $8.; input activity dur succ1; datalines; Design 5 Develop Develop 10 Document Develop 10 Test Document 6 Ship Test 8 Ship Ship 0 . ;
proc pm data=activity; act activity; succ succ1; duration dur; run;
Figure 4.10: PM Window
To convert the project specified by a SAS data set
to an MDB file that is readable by
Microsoft Project, you use the %SASTOMSP macro.
You need to use the MDBFILE= parameter to specify the location
and name of the MDB file to be created. For example,
the following statement converts the project specified by the SAS data
set Activity to the MDB file
'c:msprojsasmsp1a.mdb':
filename mspref "c:\msproj\sasmsp1a.mdb"; %sastomsp(mdbfile=mspref);
Figure 4.11: Microsoft Project Window
The schedule seen in Figure 4.10 (the PM window) is represented in terms of the time interval (days) while that in Figure 4.11 (the MS Project window) has dates. The PM procedure does not use dates if none are specified, so the project is scheduled to begin at time 0 and end at time 23. However, Microsoft Project schedules projects by using dates. Since no start date is specified, the conversion macro uses the current day as the default starting date.
To create a project schedule that is consistent across both the PM procedure and Microsoft
Project, you need to add an additional option in both the PM invocation and the %SASTOMSP macro
statement. In the PM invocation, you need to add the DATE= option to start the project on a given
date. In the following example, the project is started on December 15, 2006:
proc pm data=activity date='15Dec06'd; act activity; succ succ1; duration dur; run;
filename mspref "c:\msproj\sasmsp1b.mdb"; %sastomsp(mdbfile=mspref, _date='15Dec06'd);
Figure 4.13: Microsoft Project Window
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.