SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 23210: How to hide macro code so that it does not appear in the log when the program is executed

DetailsAboutRate It

There is a way to hide your code so that it does not appear in the log. To hide your code, store it as a stored compiled macro. More importantly, the options that write information about the code to the log can be turned off in the macro.

Here is a simple example:

   libname libref 'macro-storage-library-name';
   options mstored sasmstore=libref;

   %macro test / store;
     options nonotes nomlogic nomprint nosymbolgen nosource nosource2;

        ...more SAS statements...

   %mend;

By storing the code as a compiled macro, virtually no information about the code is written to the log. Only warnings and errors are written to the log.

For more information about the stored compiled macro facility, see SAS Macro Language Reference.

Starting in SAS 9.2, the SECURE option is introduced which causes the contents of a macro to be encrypted when stored in a stored compiled macro library.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemN/AAlln/a
SAS SystemBase SASAlln/a
* 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.