The CPM Procedure

Macro Variable _ORCPM_

The CPM procedure defines a macro variable named _ORCPM_ . This variable contains a character string that indicates the status of the procedure. It is set at procedure termination. The form of the _ORCPM_ character string is STATUS=, optionally followed by REASON=. The value for STATUS= is one of the following:

  • SUCCESSFUL - indicates successful completion

  • ERROR_EXIT - indicates unsuccessful termination

If PROC CPM terminates unsuccessfully, REASON= will be followed by one of the values below:

  • CYCLE - indicates that PROC CPM found a cycle in the project network; activity/successor (or tailnode/headnode for an AOA representation) and parent/child (see PROJECT statement) pairs define precedence relationships among the activities, which can be viewed as directed arcs in a graph

  • RES_INFEASIBLE - indicates that PROC CPM could not find a schedule that satisfies the resource requirements, given the specified resource levels; the INFEASDIAGNOSTIC option might be useful in this case

  • BADDATA_ERROR - points to problems with the input specification; an example would be neglecting to name an activity or duration variable

  • MEMORY_ERROR - occurs when memory is exhausted

  • IO_ERROR - triggered by problems with a data set

  • SEMANTIC_ERROR - indicates an incongruity in the user specification or input data

  • SYNTAX_ERROR - occurs when the user has specified an invalid value for a keyword, for instance

  • CPM_BUG - should not occur

  • UNKNOWN_ERROR - should not occur

This information can be used when PROC CPM is one step in a larger program that needs to determine whether the procedure terminated successfully or not. Because _ORCPM_ is a standard SAS macro variable, it can be used in the ways that all macro variables can be used.