BookmarkSubscribeRSS Feed
Lee_wan
Obsidian | Level 7

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.

 

catalog.png

 

So have anyone ever encountered this problem? How to update catalog when locked.

 

Thanks~

1 REPLY 1
Kurt_Bremser
Super User

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 549 views
  • 0 likes
  • 2 in conversation