The Microsoft Project Conversion Macros

Example 4.5: Exporting Data Set and Variable Names

In this example, the same project from Example 4.4 is used. However, this time 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 4.4, except for a slightly different format. The following PM invocation results in the PM window shown in Figure 4.14:
  
    proc pm data=software date='15Dec06'd; 
       act task; 
       succ s1 s2; 
       duration duration; 
    run;
 




fig3b.gif (107516 bytes)

Figure 4.14: 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 4.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 Figure 4.13:

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

Previous Page | Next Page | Top of Page