Search code examples
sassas-macro

Default catalog for stored macro SAS


By default it is defined to store macros at WORK.SASMACR. However at my site location for macros storage is different and I do not know where it is. Can I find the default macros catalog and view what is inside?


Solution

  • Please see below effects of system options SASMSTORE + MSTORED and STORE option in macro definition on location of the compiled macros - could be something similar was used on your site.

    option sasmstore=sasuser mstored;
    
    %macro _mstore /store;
    %put This is macro with mstore;
    %mend;
    
    
    %macro _nomstore;
    %put This is macro without mstore;
    %mend;
    
    proc options option=sasmstore;
    run;
    

    Use DICTIONARY.CATALOGS to list macros compiled in your session.

    proc sql;
    create table macros as
    select * from dictionary.catalogs where objtype='MACRO';
    quit;