Hi, I have a task where I have to save all Macros and print the list of all those saved macros. In my scenario, I have different '.sas' files for each different macros saved in one folders For eg. `StoredMacros` is the folder name and `Macro1`, `Macro2`, 'Macro3'..... are macros stored in different files. With the following code I am saving macros in library:- libname mylib '/home/folder/StoredMacros/';
options mstored sasmstore=mylib; Now, I am not sure whether we can store whole folder containing macros. Can we? Next, I want to have the list of all macros that are stored in library. I have came across some suggestions to use `PROC CATALOG`. Following is the some code snippets that I have tried to achieve this :- 1) proc catalog=mylib;
Contents;
run;
quit; 2) proc sql;
select *
from dictionary.catalogs
where objtype='MACRO' and libname='mylib';
quit; 3) %put _ALL_; Output of all these trials, brings list of macros of libraries 'WORK' and 'SASHELP' but not of 'mylib`. I am sure the trick is very simple but am not able to catch it. Please feel free to ask any query if I missed any detail in my query. I would appreciate the help around using PROC CATALOG. Thank You in Advance!!
... View more