<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sasmstore locked, only one user can access at a time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430676#M106465</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You&amp;nbsp;might want to contact tech support.&lt;/P&gt;
&lt;P&gt;It works fine for me.&lt;/P&gt;
&lt;P&gt;What I tested:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1st EG session, run this and disconnect server:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mstored sasmstore = MACROLIB;
libname MACROLIB 'c:\temp';

%macro test() / store;  
  data _null_; call sleep(5,1); run;
  %put --------done------------;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2 other EG sessions, run this concurrently:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mstored sasmstore = MACROLIB;
libname MACROLIB 'c:\temp';
%test;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2018 21:10:41 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2018-01-24T21:10:41Z</dc:date>
    <item>
      <title>sasmstore locked, only one user can access at a time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430523#M106417</link>
      <description>&lt;P&gt;Hello, I've created a macro that I can store globally on&amp;nbsp;a linux server defined as&amp;nbsp;follows;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mstored sasmstore = macrolib;
libname macrolib '/sas_data/macrolib';

%macro test() / store;
&amp;nbsp; macro code...
%mend;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can then call the macro in another EG session to execute the macro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%test();&lt;/P&gt;&lt;P&gt;Running...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then if I open a further session I get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%test();&lt;/P&gt;&lt;P&gt;ERROR: A lock is not available for MACROLIB.SASMACR.CATALOG.&lt;/P&gt;&lt;P&gt;ERROR: Lock held by process 23669.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to release the lock after the macro has been called but before if finishes executing?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 16:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430523#M106417</guid>
      <dc:creator>Rhys</dc:creator>
      <dc:date>2018-01-24T16:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: sasmstore locked, only one user can access at a time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430676#M106465</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You&amp;nbsp;might want to contact tech support.&lt;/P&gt;
&lt;P&gt;It works fine for me.&lt;/P&gt;
&lt;P&gt;What I tested:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1st EG session, run this and disconnect server:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mstored sasmstore = MACROLIB;
libname MACROLIB 'c:\temp';

%macro test() / store;  
  data _null_; call sleep(5,1); run;
  %put --------done------------;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2 other EG sessions, run this concurrently:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mstored sasmstore = MACROLIB;
libname MACROLIB 'c:\temp';
%test;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 21:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430676#M106465</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-01-24T21:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: sasmstore locked, only one user can access at a time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430698#M106471</link>
      <description>&lt;P&gt;You shouldn't need a lock to use the macro.&amp;nbsp; Are you trying to write new macros to the catalog from two different machines at the same time? Why?&lt;/P&gt;
&lt;P&gt;Also why are you using macro catalogs instead of just using autocall macros?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 22:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430698#M106471</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-01-24T22:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: sasmstore locked, only one user can access at a time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430825#M106504</link>
      <description>&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my project flow I have&amp;nbsp;program that defines a macro then forks out to several programs which call that macro.&amp;nbsp;Later in the process I define another macro and then call it multiple times in the same way.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue is that only the first call is working, all subsequent calls error due to lock.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 10:56:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sasmstore-locked-only-one-user-can-access-at-a-time/m-p/430825#M106504</guid>
      <dc:creator>Rhys</dc:creator>
      <dc:date>2018-01-25T10:56:32Z</dc:date>
    </item>
  </channel>
</rss>

