01-24-2018 11:24 AM - edited 01-24-2018 11:24 AM
Hello, I've created a macro that I can store globally on a linux server defined as follows;
options mstored sasmstore = macrolib; libname macrolib '/sas_data/macrolib'; %macro test() / store; macro code... %mend;
I can then call the macro in another EG session to execute the macro.
Then if I open a further session I get
ERROR: A lock is not available for MACROLIB.SASMACR.CATALOG.
ERROR: Lock held by process 23669.
Is there a way to release the lock after the macro has been called but before if finishes executing?
01-24-2018 04:10 PM
You might want to contact tech support.
It works fine for me.
What I tested:
1st EG session, run this and disconnect server:
options mstored sasmstore = MACROLIB; libname MACROLIB 'c:\temp'; %macro test() / store; data _null_; call sleep(5,1); run; %put --------done------------; %mend;
2 other EG sessions, run this concurrently:
options mstored sasmstore = MACROLIB; libname MACROLIB 'c:\temp'; %test;
01-24-2018 05:01 PM
You shouldn't need a lock to use the macro. Are you trying to write new macros to the catalog from two different machines at the same time? Why?
Also why are you using macro catalogs instead of just using autocall macros?
01-25-2018 04:17 AM - edited 01-25-2018 05:56 AM
I'm attempting to utilise parallel processing in EG; it would seem whenever a new process is created, effectively a new session is created with a new work. So any macros defined earlier in the project will not be auto called.
In my project flow I have program that defines a macro then forks out to several programs which call that macro. Later in the process I define another macro and then call it multiple times in the same way.
My issue is that only the first call is working, all subsequent calls error due to lock.
EDIT: If I run the programs individually, they all work fine, running simulataneously, however when I highlight a few at a time and run together or run from branch then the lock errors occur.