%MSPTOSAS Macro Output |
Once the file conversion is complete, the %MSPTOSAS macro uses the information from the MDB or XML file in a call to the PM procedure. The %MSPTOSAS conversion macro generates the following SAS data sets:
Activity data set: Activity
Calendar data set: Calendar
Holiday data set: Holiday
Workday data set: Workday
Resource data set: Resource
Schedule data set: Schedule
Task attributes data set: Task_Attributes
Preferences data set: Prefs
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 5, 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;
Table 6.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 4, The CPM Procedure.
Variable |
Type |
Description |
---|---|---|
_CAL_ |
Numeric |
Activity calendar variable |
A_START |
Numeric |
Actual start variable |
A_FINISH |
Numeric |
Actual finish variable |
ACTID |
Numeric |
Activity variable; has different values in the data set schedule |
ACTIVITY |
Character |
Activity name variable; used as an ID variable in the PM procedure |
ACTUID |
Numeric |
Variable uniquely identifying activities in the data sets Activity, Schedule, and Task_Attributes |
ALGNDATE |
Numeric |
Alignment date variable |
ALGNTYPE |
Character |
Alignment type variable |
ASSN_WORK |
Numeric |
Resource work variable |
B_START |
Numeric |
Baseline start date variable |
B_FINISH |
Numeric |
Baseline finish date variable |
DURATION |
Numeric |
Duration variable |
LAG |
Character |
Lag variable |
PNTUID |
Numeric |
Parent variable |
SUCCUID |
Numeric |
Successor variable |
TASK_ID |
Numeric |
Position identifier of the current activity in the list of activities |
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 4, The CPM Procedure.
Table 6.2 lists and describes the variables in the data set Holiday. For more information, see the section Multiple Calendars in
Chapter 4,
The CPM Procedure.
Variable |
Type |
Description |
---|---|---|
_CAL_ |
Numeric |
Holiday calendar variable |
HFINISH |
Numeric |
Holiday finish variable |
HOLIDUR |
Numeric |
Holiday duration variable |
HSTART |
Numeric |
Holiday start variable |
Each variable in the data set WORKDAY defines a shift in the workday. For more information, see the section Multiple Calendars in Chapter 4, The CPM Procedure.
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 6.3 are included in the data set Resource. For more information, see the section Resource Usage and Allocation in Chapter 4, The CPM Procedure.
Variable |
Type |
Description |
---|---|---|
AVAILDTE |
Numeric |
Resource availability date/time variable |
OBSTYPE |
Character |
Observation type variable |
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 5, 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.
The data set Task_Attributes stores task attribute variables. The variables in Table 6.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 data set Task_Attributes 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 and Enterprise Project Versions.
Variable |
Type |
Description |
---|---|---|
Cost1–10 |
Numeric |
Custom cost fields in Microsoft Project |
Date1–30 |
Numeric |
Custom date fields in Microsoft Project |
Duration1–10 |
Numeric |
Custom duration fields in Microsoft Project |
Finish1–10 |
Numeric |
Custom finish date/time fields in Microsoft Project |
Flag1–20 |
Character |
Custom flag fields in Microsoft Project |
Number1–20 |
Numeric |
Custom number fields in Microsoft Project |
Outlinecode1–10 |
Character |
Custom outline code fields in Microsoft Project |
Start1–10 |
Numeric |
Custom start date/time fields in Microsoft Project |
Text1–10 |
Character |
Custom 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 099999 is associated with this task in the Activity data set. See the section Calendar Data Set for details.
Finally, the data set Task_Attributes contains the ACTUID and ACTIVITY variables. These variables are also contained in the data sets Activity and Schedule.
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.
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 5, The PM Procedure.