How do you autoload source code macros?

Nico Chart_21517
Nico Chart_21517
Altair Employee
edited October 15 in Altair RapidMiner

Here is an example of a source Macro stored in D:\sasmacro1\slc_mauto_test1.sas with contents

%macro slc_mauto_test1();
data _null_;
put "Hello from slc_mauto_test1() macro";
run;
%mend;

Another Macro stored in D:\sasmacro2\slc_mauto_test2.sas with contents

%macro slc_mauto_test2();
data _null_;
put "Hello from slc_mauto_test2() macro";
run;
%mend;

To autoload and execute the macros add the following line at the top of a sourcefile
options mautosource sasautos=('D:\sasmacro1' 'D:\sasmacro2');

%slc_mauto_test1;
%slc_mauto_test2;

(you may have to restart your SLC server if you are creating new code)

 

Tagged: