Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS External Macro Lock

Status
Not open for further replies.

whoffman

Programmer
Jun 12, 2002
28
0
0
US
I created an external storage for department compiled macros, and I cannot compile into this directory while someone has SAS running on their desktop. Is this normal?
Is there a share command I can issue or something?

NOTE: The SAS System was unable to open the macro library referenced by the SASMSTORE = libref SM.
ERROR: A lock is not available for SM.SASMACR.CATALOG, lock held by another process.
ERROR: A dummy macro will be compiled.

If there is no work-around, I have to make everyone stop using SAS while I compile a macro. Surely that can't be!
Any ideas? Thanks!
 
If you have the SAS application 'include' the compiled macro then yes SAS will lock the macro library. (It also keeps it locked for some time in some cases)

What I would do in your case is have an autexec (startup) script copy the compiled macro catalog into a 'known' user location (ie. c:\temp or even the work library) and then have SAS include the macro library.

one method
autoexec.sas
Code:
libname mymac 'c:\mymacrolibrary';
proc copy in=t out=work memtype=catalog;
  select test;
run;

Then all you have to do is use the OPTION statement to set the autocall macro lookup to the include the new location.

ex
Code:
options sasautos=(sasautos,work.test);

I seem to recall that there was a bug with the compiled SAS macro catalog name. Any SAS macro catalog not named sasmacr couldn't be used this way. So just leave the compiled macro catalog the way SAS compiles it, SASMACR.

I hope this method helps you.
Klaz


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top