Thursday, August 4, 2011

Deleting Macros in SAS 9.3

In previous SAS releases, it was possible to delete a macro after you had defined it, but you had to know the name of the WORK.SASMACR library, the entry type of a macro entry, and the workings of the PROC CATALOG step in order to do the deletion. SAS 9.3 simplifies the process of deleting a macro with a new macro statement, the %SYSMACDELETE statement.

Write the macro name in this statement, and the macro is deleted. For example, to delete the RESETP macro, write:

%SYSMACDELETE RESETP;

If you are not sure the macro exists, use the NOWARN option to delete it with no warning message if it turns the macro does not exist:

%SYSMACDELETE RESETP / NOWARN;

No comments:

Post a Comment