The Microsoft Project Conversion Macros

%MSPTOSAS Macro Output

%SASTOMSP macro Once the MDB file conversion is complete, the %MSPTOSAS macro uses the information from the MDB file in a call to the PM procedure. The %MSPTOSAS conversion macro generates the following SAS data sets:

In addition, the macro generates the SAS code that enables you to reinstate your project in current and future SAS sessions. The name of the file containing this SAS code is callpm.sas. The data sets and callpm.sas file are created in the location specified by the LIBRARY= parameter. For more information about data sets, variables, options, and statements related to the PM procedure, refer to Chapter 3, "The PM Procedure."

The following statements are taken from a callpm.sas file:

  
    Libname mspout "C:\msproj"; 
    PROC PM data = mspout.Activity project=mspout.Prefs 
         caledata = mspout.Calendar 
         workdata = mspout.Workday 
         out=mspout.Schedule 
         interval=dtday 
         date="17DEC06:08:00:00"dt 
         daylength=" 8:00"t 
         suppressobswarn 
         setfinishmilestone; 
    activity ACTID; 
    successor SUCCUID / LAG = LAG; 
    duration DURATION; 
    project PNTUID; 
    id ACTIVITY ACTUID; 
    RUN;
 

Activity Data Set

Table 4.1 lists and describes the variables in the data set Activity. For more information about the activity data set in the PM procedure, see the section "Input Data Sets and Related Variables" in Chapter 2, "The CPM Procedure.".

Table 4.1: Variables in the Data Set Activity
Variable Type Description
_CAL_NumericActivity calendar variable
A_STARTNumericActual start variable
A_FINISHNumericActual finish variable
ACTIDNumericActivity variable; has different values in the data set schedule
ACTIVITYCharacterActivity name variable; used as an ID variable in the PM procedure
ACTUIDNumericVariable uniquely identifying activities in the data sets Activity, Schedule, and Task_Attributes
ALGNDATENumericAlignment date variable
ALGNTYPECharacterAlignment type variable
ASSN_WORKNumericResource work variable
B_STARTNumericBaseline start date variable
B_FINISHNumericBaseline finish date variable
DURATIONNumericDuration variable
LAGCharacterLag variable
PNTUIDNumericParent variable
SUCCUIDNumericSuccessor variable
TASK_IDNumericPosition identifier of the current activity in the list of activities

Calendar Data Set

The data set Calendar contains basic calendar data used by the PM and CPM procedures. If a task has "elapsed" duration in Microsoft Project, a special calendar is defined on 24-hour days and 7-day weeks, including holidays and other nonworking days. This calendar is associated with the tasks that have "elapsed" durations. For more information, see the section "Multiple Calendars" in Chapter 2, "The CPM Procedure."

Holiday Data Set

Table 4.2 lists and describes the variables in the data set Holiday. For more information, see the section "Multiple Calendars" in Chapter 2, "The CPM Procedure."

Table 4.2: Variables in the Data Set Holiday
Variable Type Description
_CAL_NumericHoliday calendar variable
HFINISHNumericHoliday finish variable
HOLIDURNumericHoliday duration variable
HSTARTNumericHoliday start variable

Workday Data Set

Each variable in the data set Workday defines a shift in the workday. For more information, see the section "Multiple Calendars" in Chapter 2, "The CPM Procedure."

Resource Availability Data Set

The data set Resource contains information about the resources required by the activities in the project. In addition to resource variables, the variables in Table 4.3 are included in the data set Resource. For more information, see the section "Resource Usage and Allocation" in Chapter 2, "The CPM Procedure."

Table 4.3: Variables in the Data Set Resource
Variable Type Description
AVAILDTENumericResource availability date/time variable
OBSTYPECharacterObservation type variable

Schedule Data Set

The data set Schedule contains the schedule determined by the PM procedure. This data set is described in the section "Schedule Data Set" in Chapter 3, "The PM Procedure." In addition to the standard schedule variables, the Schedule data set created by the %MSPTOSAS macro contains the variables ACTUID and ACTIVITY. Since ACTUID and ACTIVITY are also present in the Activity and Task_Attributes data sets, these variables enable you to identify activities and select a subset of the variables in these three data sets to create your report.

Task Attributes Data Set

The data set Task_Attributes stores task attribute variables. The variables in Table 4.4 take their names from Microsoft Project custom fields. If you have renamed a custom field in Microsoft Project, then the name you specified for that field is used as the label for the corresponding SAS variable. A custom field can be converted only if it has at least nondefault values for at least one task or if the field has been renamed in Microsoft Project. The variables in the Task_Attributes data set can have enterprise versions (e.g., Enterprise Cost1) and enterprise project versions (e.g., Enterprise Proj Cost1) if your project has enterprise fields defined with the Microsoft Enterprise Global Template.

Table 4.4: Variables in the Data Set Task_Attributes with Available Enterprise and Enterprise Project Versions
Variable Type Description
Cost1 - 10NumericCustom cost fields in Microsoft Project
Date1 - 30NumericCustom date fields in Microsoft Project
Duration1 - 10NumericCustom duration fields in Microsoft Project
Finish1 - 10NumericCustom finish date/time fields in Microsoft Project
Flag1 - 20CharacterCustom flag fields in Microsoft Project
Number1 - 20NumericCustom number fields in Microsoft Project
Outlinecode1 - 10CharacterCustom outline code fields in Microsoft Project
Start1 - 10NumericCustom start date/time fields in Microsoft Project
Text1 - 10CharacterCustom text fields in Microsoft Project

In addition to the variables in the preceding table, the data set Task_Attributes converts the following variables from Microsoft Project: HYPERLINK, HYPERLINKADDRESS, HYPERLINKSUBADDRESS, NOTES, TASK_COST, TASK_WBS, TASK_PCT_COMP, TASK_PCT_WORK_COMP, TASK_PRIORITY, and TASK_REM_DUR.

In the data set Task_Attributes, the variable DURATION_ELAPSED indicates whether the task duration is "elapsed" in Microsoft Project. When a task duration is elapsed, the special calendar n099999 is associated with this task in the Activity data set. See the section "Calendar Data Set" for details.

Finally, the Task_Attributes data set contains the ACTUID and ACTIVITY variables. These variables are also contained in the Activity and Schedule data sets.

Note: For MDB files created in Microsoft Project 98, the only variables present in the data set Task_Attributes are ACTUID, ACTIVITY, DURATION_ELAPSED, TASK _COST, TASK_PCT_COMP, TASK_PCT_WORK_COMP, TASK_PRIORITY, TASK _REM_DUR, and TASK_WBS.

Project Preference Data Set

The data set Prefs is created by the PM procedure to save and restore preferences that control the project view. For more information, see the section "Saving and Restoring Preferences" in Chapter 3, "The PM Procedure."

Previous Page | Next Page | Top of Page