🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How do you autoload source code macros?

User: "Nico Chart_21517"
Altair Employee
Updated by Nico Chart_21517

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)

 

Find more posts tagged with

Comments

No comments on this post.