<?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 ERROR: A lock is not available for [name of dataset].  We are using SAS enterprise guide. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-lock-is-not-available-for-name-of-dataset-We-are-using/m-p/781748#M249153</link>
    <description>&lt;P&gt;We are using SAS Enterprise Guide.&amp;nbsp; This is the error message we are getting:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR: A lock is not available for DATA.AZPICU1CON_20211122.DATA.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;WARNING: The data set DATA.AZPICU1CON_20211122 was only partially opened and &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;will not be saved.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can't figure out how to resolve this error.&amp;nbsp; This is the code that we are running when the error occurs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data &amp;amp;consented; &lt;BR /&gt;set &amp;amp;out;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;if consent=0 then delete; &lt;BR /&gt;else if consent=. then delete;&lt;/P&gt;
&lt;P&gt;surveydate=datepart(initial_survey_timestamp); &lt;BR /&gt;format surveydate date9.; &lt;BR /&gt;drop initial_survey_timestamp;&lt;BR /&gt;*calculating age; &lt;BR /&gt;if childdob^=. then childagec=round(%age(surveydate,childdob)/12, .01);&lt;BR /&gt;label childagec="Child age calculated(years)";&lt;BR /&gt;&lt;BR /&gt;if childagec=. then childagec_4cat=.; &lt;BR /&gt;else if childagec&amp;lt;1 then childagec_4cat=1; &lt;BR /&gt;else if childagec&amp;gt;=1 and childagec&amp;lt;5.9 then childagec_4cat=2; &lt;BR /&gt;else if childagec&amp;gt;=5.9 and childagec&amp;lt;13 then childagec_4cat=3; &lt;BR /&gt;else if childagec&amp;gt;=13 then childagec_4cat=4; &lt;BR /&gt;format childagec_4cat childage.;&lt;BR /&gt;label childagec_4cat="Child age calculated_4cat";&lt;/P&gt;
&lt;P&gt;if childagec=. then childagec_3cat=.; &lt;BR /&gt;else if childagec&amp;lt;1 then childagec_3cat=1; &lt;BR /&gt;else if childagec&amp;gt;=1 and childagec&amp;lt;5.9 then childagec_3cat=2; &lt;BR /&gt;else if childagec&amp;gt;=5.9 then childagec_3cat=3; &lt;BR /&gt;format childagec_3cat childage_3cat.;&lt;BR /&gt;label childagec_3cat="Child age calculated_3cat";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 16:43:33 GMT</pubDate>
    <dc:creator>hein68</dc:creator>
    <dc:date>2021-11-22T16:43:33Z</dc:date>
    <item>
      <title>ERROR: A lock is not available for [name of dataset].  We are using SAS enterprise guide.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-lock-is-not-available-for-name-of-dataset-We-are-using/m-p/781748#M249153</link>
      <description>&lt;P&gt;We are using SAS Enterprise Guide.&amp;nbsp; This is the error message we are getting:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR: A lock is not available for DATA.AZPICU1CON_20211122.DATA.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;WARNING: The data set DATA.AZPICU1CON_20211122 was only partially opened and &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;will not be saved.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can't figure out how to resolve this error.&amp;nbsp; This is the code that we are running when the error occurs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data &amp;amp;consented; &lt;BR /&gt;set &amp;amp;out;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;if consent=0 then delete; &lt;BR /&gt;else if consent=. then delete;&lt;/P&gt;
&lt;P&gt;surveydate=datepart(initial_survey_timestamp); &lt;BR /&gt;format surveydate date9.; &lt;BR /&gt;drop initial_survey_timestamp;&lt;BR /&gt;*calculating age; &lt;BR /&gt;if childdob^=. then childagec=round(%age(surveydate,childdob)/12, .01);&lt;BR /&gt;label childagec="Child age calculated(years)";&lt;BR /&gt;&lt;BR /&gt;if childagec=. then childagec_4cat=.; &lt;BR /&gt;else if childagec&amp;lt;1 then childagec_4cat=1; &lt;BR /&gt;else if childagec&amp;gt;=1 and childagec&amp;lt;5.9 then childagec_4cat=2; &lt;BR /&gt;else if childagec&amp;gt;=5.9 and childagec&amp;lt;13 then childagec_4cat=3; &lt;BR /&gt;else if childagec&amp;gt;=13 then childagec_4cat=4; &lt;BR /&gt;format childagec_4cat childage.;&lt;BR /&gt;label childagec_4cat="Child age calculated_4cat";&lt;/P&gt;
&lt;P&gt;if childagec=. then childagec_3cat=.; &lt;BR /&gt;else if childagec&amp;lt;1 then childagec_3cat=1; &lt;BR /&gt;else if childagec&amp;gt;=1 and childagec&amp;lt;5.9 then childagec_3cat=2; &lt;BR /&gt;else if childagec&amp;gt;=5.9 then childagec_3cat=3; &lt;BR /&gt;format childagec_3cat childage_3cat.;&lt;BR /&gt;label childagec_3cat="Child age calculated_3cat";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 16:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-lock-is-not-available-for-name-of-dataset-We-are-using/m-p/781748#M249153</guid>
      <dc:creator>hein68</dc:creator>
      <dc:date>2021-11-22T16:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: A lock is not available for [name of dataset].  We are using SAS enterprise guide.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-A-lock-is-not-available-for-name-of-dataset-We-are-using/m-p/781756#M249156</link>
      <description>&lt;P&gt;This code in isolation should not be generating that error, the error is basically telling you that the dataset is unavailable for write&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming &lt;SPAN&gt;&amp;amp;consented is set to&amp;nbsp;&lt;STRONG&gt;DATA.AZPICU1CON_20211122&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have permission issues, i.e. can you write to the DATA library?&lt;/P&gt;
&lt;P&gt;Does another user/process have that dataset open?&lt;/P&gt;
&lt;P&gt;What happens if you change the value of &amp;amp;consented e.g. work.test?&lt;/P&gt;
&lt;P&gt;Is there additional code that is running or is this the only part of the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be helpful if you posted the actual log, as that would provide context and potentially other clues&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>Mon, 22 Nov 2021 18:10:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-A-lock-is-not-available-for-name-of-dataset-We-are-using/m-p/781756#M249156</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-11-22T18:10:28Z</dc:date>
    </item>
  </channel>
</rss>

