Macro Variables

Each bill of material postprocessing macro defines a macro variable named _MACRONAME_, where MACRONAME is the name of the macro. Each macro variable contains a character string that indicates the status of the corresponding macro execution. It is set at the completion of the macro execution. The form of the character string is STATUS=status, where status can be one of the following:

SUCCESSFUL

indicates successful completion of the macro.

IO_ERROR

indicates that the macro failed to open the input data sets or to create the output data set.

RUNTIME_ERROR

indicates that macro execution was halted due to an error found by the SAS System.

RUNTIME_WARNING

indicates that macro execution was completed, but a warning was issued by the SAS System.

SYNTAX_ERROR

indicates that macro execution was halted due to an error in the macro invocation syntax.

SYNTAX_WARNING

indicates that macro execution was completed, but a warning in the macro invocation syntax was issued.

You can check the SAS log for detailed error or warning messages if a macro variable has a value other than STATUS=SUCCESSFUL. These messages will help you determine the source of the errors. You can also use MPRINT, MLOGIC, SYMBOLGEN, or other SAS System options to help track down errors. For details, refer to the Macro Facility Error Messages and Debugging chapter in SAS Macro Language: Reference.