Error: The variable value was declared READONLY and cannot be
A macro variable defined as read-only has
been listed in the %SYMDEL statement.
Read-only macro variables cannot be deleted
using the %SYMDEL statement.
Error: The variable value was previously declared as READONLY and
cannot be re-declared.
An attempt was made to redefine a macro
variable that was initialized with the
READONLY option on a %GLOBAL or
%LOCAL statement for a second time.
A macro variable can be defined only once on
a %GLOBAL or %LOCAL statement when
using the READONLY option.
SAS Macro Warning Messages
This section contains warning messages that might be reported when using macros and
the solutions to correct them . If you are unable to resolve the warning, then contact SAS
WARNING: Apparent symbolic reference value not resolved.
A macro variable is being referenced but
cannot be found.
Define the macro variable before resolution.
A macro variable was spelled incorrectly. Verify the spelling of the macro variable.
A local macro variable to a specific macro is
being used globally outside the macro.
Add the macro variable to a %GLOBAL
statement, or if you are using CALL
SYMPUT, then use CALL SYMPUTX with
the third argument as 'g', for example,
A macro variable is being used in the same
step as a CALL SYMPUT routine.
A step boundary such as a RUN statement
must be reached before resolving the macro
variable created with CALL SYMPUT.
SAS Macro Warning Messages 427
The macro resolution occurred within a macro
when the macro variable was created with a
CALL SYMPUT routine or the INTO clause.
The macro is being invoked with a CALL
Place the %NRSTR function around the
macro invocation, for example,
This delays the resolution.
You have omitted the period delimiter when
adding text to the end of the macro variable.
When text follows a macro variable a period is
needed after the macro variable name, for
This code resolves to abcdef.
WARNING: Apparent invocation of macro value not resolved.
You have misspelled the macro name. Verify the spelling of the macro name.
The MAUTOSOURCE system option is
If invoking an autocall macro, then the
MAUTOSOURCE system option must be
The MAUTOSOURCE system option is on,
but you have specified an incorrect pathname
in the SASAUTOS= system option.
The SASAUTOS= system option must
contain the exact path for the location of the
You are using the autocall facility but you do
not have permission to the path on the
SASAUTOS= system option.
Ensure that you have Read or Write access to
You are using the autocall facility but you
have given different names for the macro
name and the filename.
When using autocall macros, the macro name
must match the filename exactly.
You are using the autocall facility but did not
give the file a .sas extension.
When using autocall macros, the file that
contains the macro must have the .sas
You are using the autocall facility but the
filename contains mixed case.
When using autocall macros, on UNIX the
filename must be all lowercase letters.
The macro has not been compiled. The definition of a macro must be compiled
before the invocation of a macro.
Warning: Extraneous text on %MEND statement ignored for macro
428 Appendix 2 • SAS Macro Facility Error and Warning Messages