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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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