How to save a user-defined macro to a user-defined library

Compiled and stored:

libname mylib 'SAS-data-library';
options mstored sasmstore=mylib;

%macro test / store source des='Description of macro';
  clause...
  clause...
%mend;

Then write the following to autoexec.sas:

libname mylib 'SAS-data-library';
options mstored sasmstore=mylib;

Call it as usual:

%MYMACRO ;

refs:
https://stackoverflow.com/questions/38487432/sas-how-to-save-a-user-defined-macro-to-a-user-defined-library
https://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a001328775.htm

posted @ 2023-08-09 16:48  helloyuen  阅读(9)  评论(0)    收藏  举报