Hi all,
Recently, I encountered a problem about macro storage.
When I generate a catalog with the following program:
libname MyMacros "&ProjDir.\&Deliver.\Data\SDTM\MetaData";
options mstored sasmstore=MyMacros;
data _null_;
set MacroList;
call execute('%include "'||strip(MacroList)||'";');
run;
proc catalog cat=MyMacros.sasmacr;
contents;
run;
quit;
Then the sasmacr.sas7bcat was created at target path.
However, whenever I want to update the catalog, if anyone opens sas and reads this catalog, it always reminds me that the file is locked and cannot be updated, which annoy me a lot. I won't be able to update until everyone turns sas off.
So have anyone ever encountered this problem? How to update catalog when locked.
Thanks~
You need to use a time window where no SAS session is running that has the sasmstore option set to this catalog. That's the disadvantage of using compiled macros. If you use the autocall library, you do not have that problem.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.