<?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: Stored Process Error - Lock Not Available in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473926#M5721</link>
    <description>&lt;P&gt;Try clearing the TEMP libname in your EG session after using it, then reassign it in your Stored Process session. EG sessions run under your user account,&amp;nbsp;&lt;SPAN&gt;Stored Process sessions run under a shared service user account.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You will still get the lock problem if you run two&amp;nbsp;Stored Process sessions at the same time.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jun 2018 22:17:46 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-06-27T22:17:46Z</dc:date>
    <item>
      <title>Stored Process Error - Lock Not Available</title>
      <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473893#M5718</link>
      <description>&lt;P&gt;I am getting the following error in SAS EG when I run a stored process from a VB Script.&amp;nbsp; If I run it manually, it runs fine.&amp;nbsp; Any ideas on how set this up properly would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: A lock is not available for TEMP.V_PRM_DATA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 19:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473893#M5718</guid>
      <dc:creator>cbrotz</dc:creator>
      <dc:date>2018-06-27T19:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Error - Lock Not Available</title>
      <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473914#M5719</link>
      <description>&lt;P&gt;I would compare the definition of the TEMP library between your two modes of operation. Storing this table in your WORK library will prevent this error as each SAS session is allocated a unique WORK library.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 21:20:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473914#M5719</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-06-27T21:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Error - Lock Not Available</title>
      <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473916#M5720</link>
      <description>&lt;P&gt;I was originally running this to store in the WORK. Library and could not use the results the next step in the EG session.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The work library does not save evidently:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No, because the work session disappears when the stored process is done. You can write the file to a temp or perhaps rather than a stored process use a %INCLUDE to call the program instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The TEMP library works.....sometimes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 21:34:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473916#M5720</guid>
      <dc:creator>cbrotz</dc:creator>
      <dc:date>2018-06-27T21:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Error - Lock Not Available</title>
      <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473926#M5721</link>
      <description>&lt;P&gt;Try clearing the TEMP libname in your EG session after using it, then reassign it in your Stored Process session. EG sessions run under your user account,&amp;nbsp;&lt;SPAN&gt;Stored Process sessions run under a shared service user account.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You will still get the lock problem if you run two&amp;nbsp;Stored Process sessions at the same time.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 22:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473926#M5721</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-06-27T22:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Error - Lock Not Available</title>
      <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473938#M5723</link>
      <description>&lt;P&gt;I see code for&amp;nbsp; "libname_all_clear;" &amp;nbsp; Is that what you are referring to?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I assign a library?&amp;nbsp; I know we used to use libname statements.&amp;nbsp; Is it something like that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 23:47:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473938#M5723</guid>
      <dc:creator>cbrotz</dc:creator>
      <dc:date>2018-06-27T23:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Error - Lock Not Available</title>
      <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473978#M5724</link>
      <description>&lt;P&gt;The problem is that sas data set can only be written or updated by one user at a time, otherwise you get the lock error message.&lt;/P&gt;
&lt;P&gt;One way to solve this is to name the dataset with a time stamp or user name so every dataset is unique.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest is to add the user name as a suffix. I don' remember which macro variable that are automatic in the stored process but one of _METAUSER, SYSUSERID SASUSER should work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test&amp;amp;_METAUSER;&lt;BR /&gt; a = 10;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Fredrik&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 06:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/473978#M5724</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2018-06-28T06:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Error - Lock Not Available</title>
      <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/474056#M5725</link>
      <description>&lt;P&gt;I am pretty sure I am the only one creating stored processes in our system...I am definitely not running the same stored process from two different SAS EG sessions at the same time. &amp;nbsp; Something else seems like it is not working right.&amp;nbsp; It seems more like once the stored process runs, it does not free up the connection to that file even though it is a temp file. Hours later, it is still locked. The naming idea might work.&amp;nbsp; I will give that a try.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 12:56:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/474056#M5725</guid>
      <dc:creator>cbrotz</dc:creator>
      <dc:date>2018-06-28T12:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Stored Process Error - Lock Not Available</title>
      <link>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/474556#M5726</link>
      <description>&lt;P&gt;What was happening is that my stored process to create a file in a SAS EG session was running exactly the same time as the code.&amp;nbsp; I thought the code would "wait"&amp;nbsp; but I guess it does not work that way.&amp;nbsp; I used the following code solution to "sleep" the program.&amp;nbsp; It is not exactly what I was looking for but it will work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-message-heading lia-component-message-header"&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-standard"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-left"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;&lt;DIV class="lia-message-subject"&gt;Re: Sleep Question&lt;DIV&gt;&lt;DIV class="MessageReadByModeratorCell lia-moderation-moderated"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="reply-to-stamp"&gt;&lt;SPAN class="reply-author"&gt;&amp;nbsp;&lt;SPAN&gt;KevinC&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;&lt;SPAN class="DateTime lia-message-posted-on lia-component-common-widget-date"&gt;&lt;SPAN class="local-date"&gt;‎02-07-2013&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;06:27 PM&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="lia-component-body"&gt;&lt;DIV class="lia-message-body lia-tooltip-trigger"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Look for the CALL SLEEP function instead of trying to guess how long a loop takes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call sleep (600,1); /* 600 seconds*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Jun 2018 18:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Stored-Process-Error-Lock-Not-Available/m-p/474556#M5726</guid>
      <dc:creator>cbrotz</dc:creator>
      <dc:date>2018-06-29T18:31:41Z</dc:date>
    </item>
  </channel>
</rss>

