SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 42267: Macro parameters using recursion causes a warning

DetailsHotfixAboutRate It

If a macro parameter is set equal to itself, then the following type of warning message is issued and the macro variable is set to null:

   WARNING: The text expression &AA contains a recursive reference to the 
   macro variable AA.  The macro variable will be assigned the null value.

Here is the code that would cause the warning above:

   %macro test(aa=&aa);
     %put &aa; 
   %mend test; 
                                       
   %test(aa=100)

Even if the macro variable AA existed before running the code above, the warning is still issued, and the value is set to null.

The only way to avoid the warning would be to avoid the recursion, for example:

   %macro test(aa=);
     %put &aa; 
   %mend test; 
                                       
   %test(aa=100)

Receiving this warning is the correct and expected behavior.

If you want to suppress the warning message, issue the following OPTIONS statement AFTER applying the hotfix:

options NOMWARNDEFAULTARGRECURSION;


Click the Hot Fix tab in this note to access the hot fix for this issue.

Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.2 TS2M09.4 TS1M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.2 TS2M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.2 TS2M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.2 TS2M0
Microsoft Windows XP 64-bit Edition9.2 TS2M0
Microsoft® Windows® for x649.2 TS2M09.4 TS1M0
Microsoft Windows Server 2003 Datacenter Edition9.2 TS2M0
Microsoft Windows Server 2003 Enterprise Edition9.2 TS2M0
Microsoft Windows Server 2003 Standard Edition9.2 TS2M0
Microsoft Windows Server 2003 for x649.2 TS2M0
Microsoft Windows Server 2008 for x649.2 TS2M09.4 TS1M0
Microsoft Windows XP Professional9.2 TS2M0
Windows Vista9.2 TS2M0
Windows Vista for x649.2 TS2M0
64-bit Enabled AIX9.2 TS2M09.4 TS1M0
64-bit Enabled HP-UX9.2 TS2M09.4 TS1M0
64-bit Enabled Solaris9.2 TS2M09.4 TS1M0
HP-UX IPF9.2 TS2M09.4 TS1M0
Linux9.2 TS2M09.4 TS1M0
Linux for x649.2 TS2M09.4 TS1M0
OpenVMS on HP Integrity9.2 TS2M09.4 TS1M0
Solaris for x649.2 TS2M09.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.