Problem Note 46585: Calling a macro with no parameters where parameters were expected may cause an error
If a macro was defined with positional parameters and then called within another macro with no parameter list, an error may occur. For example (%inner has nothing following it):
%macro inner(parm);
%let var = VALUE;
%put NOTE: &var;
%mend;
%macro outer();
%inner
%mend;
%outer;
In this case the following warning would be issued:
WARNING: Apparent symbolic reference VAR not resolved.
Because the macro call contained no argument list, but was defined with an argument list, a
premature end of the execution of the enclosing macro occurred. Also, there is a premature
deletion of the enclosing macro symbol table that results in the warning above.
Work-around is to place a semicolon or pass an empty argument within the macro call. For example:
%macro outer();
%inner;
%mend;
or
%macro outer();
%inner()
%mend;
Operating System and Release Information
SAS System | N/A | Microsoft Windows XP Professional | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2008 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft® Windows® for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.3 TS1M2 | 9.4 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.3 TS1M2 | 9.4 TS1M0 |
Z64 | 9.3 TS1M2 | 9.4 TS1M0 |
z/OS | 9.3 TS1M2 | 9.4 TS1M0 |
Teradata on Linux | 9.3 TS1M2 | 9.4 TS1M0 |
Netezza TwinFin 64-bit SMP Hosts | 9.3 TS1M2 | 9.4 TS1M0 |
Netezza TwinFin 64-bit S-Blades | 9.3 TS1M2 | 9.4 TS1M0 |
Netezza TwinFin 32-bit SMP Hosts | 9.3 TS1M2 | 9.4 TS1M0 |
Netezza TwinFin 32bit blade | 9.3 TS1M2 | 9.4 TS1M0 |
Greenplum on Linux x64 | 9.3 TS1M2 | 9.4 TS1M0 |
DB2 Universal Database on Linux x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Aster Data nCluster on Linux x64 | 9.3 TS1M2 | 9.4 TS1M0 |
DB2 Universal Database on AIX | 9.3 TS1M2 | 9.4 TS1M0 |
Windows 7 Enterprise 32 bit | 9.3 TS1M2 | |
Windows 7 Enterprise x64 | 9.3 TS1M2 | |
Windows 7 Home Premium 32 bit | 9.3 TS1M2 | |
Windows 7 Home Premium x64 | 9.3 TS1M2 | |
Windows 7 Professional 32 bit | 9.3 TS1M2 | |
Windows 7 Professional x64 | 9.3 TS1M2 | |
Windows 7 Ultimate 32 bit | 9.3 TS1M2 | |
Windows 7 Ultimate x64 | 9.3 TS1M2 | |
Windows Vista | 9.3 TS1M2 | 9.4 TS1M0 |
Windows Vista for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled AIX | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.3 TS1M2 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.3 TS1M2 | 9.4 TS1M0 |
HP-UX IPF | 9.3 TS1M2 | 9.4 TS1M0 |
Linux | 9.3 TS1M2 | 9.4 TS1M0 |
Linux for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
Linux on Itanium | 9.3 TS1M2 | 9.4 TS1M0 |
Solaris for x64 | 9.3 TS1M2 | 9.4 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
If invoking a nested macro and no parenthesis was placed on the macro call but the macro was defined with parameters, an error may occur.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2012-05-15 15:40:04 |
Date Created: | 2012-05-15 14:42:42 |