Example 6.6 Exporting Data Set and Variable Names

In this example, the same project from Example 6.5 is used. However, in this case, the data set names and variable names do not have the default variables, so they must be explicitly specified in the %SASTOMSP macro.

For example, suppose the data set containing the activity information is created as follows:

data software;
   format task s1 s2 $8.;
   input task duration s1 s2;
   datalines;
Design    5  Develop   .
Develop  10  Document  Test
Document  6  Ship      .
Test      8  Ship      .
Ship      0  .         .
;

This data set is identical to the data set Activity in Example 6.5, except for a slightly different format. The following PM invocation results in the PM window shown in Output 6.6.1:

proc pm data=software date='15Dec06'd;
   act task;
   succ s1 s2;
   duration duration;  
run;

Output 6.6.1: PM Window

PM Window


To convert the data to an MDB file, you need to specify several additional parameters in the %SASTOMSP macro call. First, you need to specify the name of the data set (Software in this case) using the ACTDS= parameter. In Example 6.1, this parameter was not needed, because the default data set name Activity was used.

Similarly, you must specify the names of the activity, duration, and successor variables using the _ACTIVITY=, _DUR=, and _SUCCESSOR= parameters, respectively.

The following call to the %SASTOMSP macro results in the Microsoft Project window as shown in Output 6.5.4:

filename mspref "C:\MSPROJ\sasmsp2.mdb";
%sastomsp(mdbfile=mspref,
          actds=software,
          _activity=task,
          _dur=duration,
          _successor=s1 s2,
          _date='15Dec06'd);