%SASTOMSP Macro Parameters

%SASTOMSP(

PROJ_NAME=project_name, LIBRARY=library,

 

MDBFILE=mdbfile, ACTDS=SAS-data-set,

 

CALDS=SAS-data-set, HOLDS=SAS-data-set,

 

WORKDS=SAS-data-set, RESDS=SAS-data-set,

 

SCHEDULEDS=SAS-data-set, _INTERVAL=_interval,

 

_DATE=_date, _FBDATE=_fbdate,

 

_DAYSTART=_daystart, _DAYLENGTH=_daylength,

 

_CALID=variable, _ACTIVITY=variable,

 

_ID=variable, _DUR=variable,

 

_ALIGNDATE=variable, _ALIGNTYPE=variable,

 

_HEAD=variable, _TAIL=variable, _PROJECT=variable,

 

_SUCCESSOR=_successor, _LAG=_lag,

 

_HOLISTART=variable, _HOLIEND=variable,

 

_HOLIDUR=variable, _RESOURCE=_resource,

 

_RESOBSTYPE=variable, _RESPERIOD=variable,

 

DBMS=identifier, SERVER=pc-server-hostname,

 

PORT=port-number);

General Project Parameters

LIBRARY=library

specifies the location of the input SAS data sets. This parameter can be either a SAS library reference or a path. A path can be specified with double quotes, single quotes, or no quotes. For example, in the following %SASTOMSP invocation, a path is specified with double quotes:

   %sastomsp(library="C:\SASPROJ", mdbfile=C:\MSPROJ\filename.mdb);

The default value is 'WORK', which is the default libref generally assigned to your temporary SAS data library for the current session or job.

MDBFILE=mdbfile

specifies the output MDB file. This parameter can be either a SAS fileref or a filename. A filename can be specified with double quotes, single quotes, or no quotes.

If mdbfile does not have the file extension .mdb, the macro checks whether it is an assigned fileref. If mdbfile is a fileref, the macro creates an MDB file as specified by this fileref. If mdbfile is not a fileref, the resulting MDB file takes the value of mdbfile as the prefix and is created in the location specified by the LIBRARY= parameter.

If mdbfile is a fileref, the macro creates an MDB file as specified by this fileref. If you are running the %MSPTOSAS macro on UNIX, mdbfile has to be a filename.

If mdbfile is a filename without a path, then the %SASTOMSP macro uses the default path of the OUTFILE= option of PROC EXPORT. In many cases, this default path is 'C:$\backslash $Documents and Settings$\backslash $username$\backslash $'. See the PROC EXPORT documentation in Base SAS Procedures Guide for details.

This parameter is required; there is no default value.

PROJ_NAME=project_name

specifies the name of the project. The default value is 'Project Imported from SAS'.

Input Data Set Parameters

ACTDS=SAS-data-set

specifies the name of the Activity data set used by the PM and CPM procedures. The default value is ACTIVITY. For more information, see the section Input Data Sets and Related Variables in Chapter 4: The CPM Procedure.

CALDS=SAS-data-set

specifies the name of the Calendar data set used by the PM and CPM procedures. There is no default value. This parameter is required when the project uses special calendars. If the project uses the standard calendar defined by the INTERVAL=, DAYSTART=, and DAYLENGTH= parameters, then the CALDS= parameter is optional. For more information, see the section Multiple Calendars in Chapter 4: The CPM Procedure.

HOLDS=SAS-data-set

specifies the name of the Holiday data set used by the PM and CPM procedures. There is no default value. This parameter is required only if the project uses holidays defined in a Holiday data set. For more information, see the section Multiple Calendars in Chapter 4: The CPM Procedure.

RESDS=SAS-data-set

specifies the name of the Resource data set used by the PM and CPM procedures. There is no default value. This parameter is required only if the project requires resource information defined in a Resource data set. For more information, see the section Resource Usage and Allocation in Chapter 4: The CPM Procedure.

SCHEDULEDS=SAS-data-set

specifies the name of the Schedule data set generated by the PM procedure, as described in Chapter 5. You can alternatively specify a Schedule data set generated by the CPM procedure, as described in the section Schedule Data Set in Chapter 5: The PM Procedure. The SCHEDULEDS= parameter has no default value. When this parameter is specified, the macro stores the SAS schedules in Microsoft Project date fields, as shown in Table 6.5.

Table 6.5: SAS Schedule Conversion

Schedule

SAS Variables

Microsoft Project Fields

Early schedule

E_START, E_FINISH

SAS_E_start, SAS_E_finish

Late schedule

L_START, L_FINISH

SAS_L_start, SAS_L_finish

Resource-constrained schedule

S_START, S_FINISH

SAS_R_start, SAS_R_finish

Actual schedule

A_START, A_FINISH

SAS_A_start, SAS_A_finish

Baseline schedule

B_START, B_FINISH

SAS_B_start, SAS_B_finish


In Microsoft Project, you can display these date fields by going to the Insert menu, selecting Column, and selecting the fields you want to display. You can also display the schedule in a Gantt chart. See Example 6.8 for details.

WORKDS=SAS-data-set

specifies the name of the Workday data set used by the PM and CPM procedures. There is no default value. This parameter is required only when the specified calendar refers to special work shifts defined in a Workday data set. For more information, see the section Multiple Calendars in Chapter 4: The CPM Procedure.

Variable and Option Parameters

_ACTIVITY=variable

specifies the name of the variable in the Activity data set that contains the names of the tasks. The default value is ACTIVITY.

_ALIGNDATE=variable

identifies the variable in the Activity data set that specifies the date to be used to constrain an activity to start or finish on a particular date. This variable is optional, and it has no default value.

_ALIGNTYPE=variable

identifies the variable in the Activity data set that specifies whether the date value specified in the ALIGNDATE= parameter is the earliest start date, the latest finish date, and so forth, for the activity in the observation. This variable is optional, and it has no default value.

_CALID=variable

identifies the variable that is used in the Activity, Holiday, and Calendar data sets to identify the calendar to which each observation refers. When this parameter is not specified, the macro uses a default variable named _CAL_ in each of the three data sets.

_DATE=_date

specifies the SAS date, time, or datetime that is to be used as an alignment date for the project. The default value is the current value of the SAS system time.

_DAYLENGTH=_daylength

specifies the length of the workday. The default value is '8:00't, if _INTERVAL is specified as 'WORKDAY' or 'DTWRKDAY'. Otherwise, the default value is '24:00't.

_DAYSTART=_daystart

specifies the start of the workday. The default value is '9:00't, if _INTERVAL is specified as 'WORKDAY' or 'DTWRKDAY'. Otherwise, the default value is '0:00't.

_DUR=variable

identifies the variable in the Activity data set that contains the durations of the tasks. The default value is 'DUR'.

_FBDATE=_fbdate

specifies the SAS date, time, or datetime that specifies a project deadline. When this parameter is specified, the project is scheduled according to this project finish time.

_HEAD=variable

identifies the variable in the Activity data set that contains the name of the node on the head of an arc in the project network. This parameter is required when the project is in AOA (Activity-on-Arc) format.

_HOLIDUR=variable

identifies the variable in the Holiday data set that specifies the duration of the holiday. This variable is used to calculate the finish time of a holiday. If the _HOLIEND= parameter is specified, any value specified for the _HOLIDUR= parameter is ignored. This variable is optional; it has no default value.

_HOLIEND=variable

identifies the variable in the Holiday data set that specifies the finish time of each holiday. This variable is optional, and it has no default value.

_HOLISTART=variable

identifies the variable in the Holiday data set that specifies the start time of each non-workday. This variable is optional, and it has no default value.

_ID=_id

defines a string that lists the ID variables, separated by a space. The format of the _ID= parameter is id1 id2 …id$n$, where $n$ is the number of ID variables. When this parameter is specified, the macro passes ID variables to Microsoft Project. You can view them in Microsoft Project by inserting the columns 'text$1$' through 'text$n$'.

_INTERVAL=interval

specifies the interval units by which task durations are measured. Possible values are DAY, WEEK, WEEKDAYS, WORKDAY, MONTH, QTR, YEAR, HOUR, MINUTE, SECOND, DTDAY, DTWRKDAY, DTWEEK, DTMONTH, DTQTR, DTYEAR, DTHOUR, DTMINUTE, and DTSECOND. The default value of _INTERVAL= is DAY.

_LAG=_lag

defines a string that lists the lag variables, separated by a space. The format of the _LAG= parameter is lag1 lag2 …lag$n$, where $n$ is the number of lag variables.

Note: Microsoft Project does not enable predecessors of a summary task to have a finish-to-finish or start-to-finish dependency.

Note: Microsoft Project does not permit the use of lag calendars. The %SASTOMSP macro converts calendar information. The names (or IDs) of lag calendars assigned to activities are saved in a text field in Microsoft Project called Lag Calendars in SAS.

_PROJECT=variable

identifies the variable in the Activity data set that specifies the project to which an activity belongs. This parameter is required when tasks have hierarchical relationships.

_RESOBSTYPE=variable

identifies the character variable in the Resource data set that contains the type identifier for each observation. The _RESOBSTYPE= parameter is required if the RESDS= parameter is specified.

_RESOURCE=_resource

defines a string that lists the resource variables, separated by a space. The _RESOURCE= parameter is required if the RESDS= parameter is specified. The format of the resource parameter is res1 res2 …res$n$, where $n$ is the number of resource variables.

_RESPERIOD=variable

identifies the variable in the Resource data set that specifies the date from which a specified level of the resource is available for each observation with the _RESOBSTYPE= variable equal to 'RESLEVEL.'

_SUCCESSOR=_successor

defines a string that lists the successor variables in the Activity data set, separated by a space. The format of the _SUCCESSOR= parameter is succ1 succ2 …succ$n$, where $n$ is the number of successor variables. If this parameter is not specified, the macro identifies all variables in the Activity data set having names prefixed with 'SUCC' as successor variables.

_TAIL=variable

identifies the variable in the Activity data set that contains the name of the node on the tail of an arc in the project network. This parameter is required when the project is in AOA format.

UNIX Parameters

The following statements are available to establish a connection from SAS running on UNIX to a SAS PC Files Server. This enables you to run the %SASTOMSP macro on UNIX. For more information, see SAS/ACCESS Interface to PC Files: Reference.

DBMS=identifier

specifies the type of data to import. In this case, the value DBMS=accesscs must be specified.

PORT=port-number

specifies the port or service name that the SAS PC Files Server is listening to on the PC. The default value is 8621.

SERVER=pc-server-hostname

specifies the name of the computer on which you started the PC Files Server. This name is required by UNIX users to connect to this server machine and is reflected on the server control panel. This hostname can be specified as a simple computer name (e.g., wxp320), a fully qualified network name (e.g., wxp320.domain.com), or an IP address.