<?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: Why is my program throwing a LOCK error and how do I fix it? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501978#M595</link>
    <description>&lt;P&gt;I would check to ensure that your Proc SQL involving that step actually has a quit to end it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unable to get a Lock often indicates&amp;nbsp;you or another person/program is using the file in some manner. So if another program might be running attempting to read or write that data set in that library you could get that message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Oct 2018 16:12:43 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-10-05T16:12:43Z</dc:date>
    <item>
      <title>Why is my program throwing a LOCK error and how do I fix it?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501963#M592</link>
      <description>&lt;P&gt;Please help me!&amp;nbsp; Why is my program throwing this lock error and how do I fix it?&amp;nbsp; Everything is working fine in my program until I get to this section.&amp;nbsp; I'm working in SAS EG 6.1.&amp;nbsp; My output will consist of both files, so I need to write both out to nonWORK files.&amp;nbsp; Please see the section from my log below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;66 create table jmada2.&amp;amp;acct._member_list as&lt;BR /&gt;67 select distinct&lt;BR /&gt;68 CASE&lt;BR /&gt;69 when svc_period = '1' then 'BASE'&lt;BR /&gt;70 when svc_period = '2' then 'CURR'&lt;BR /&gt;71 else ''&lt;BR /&gt;72 END&lt;BR /&gt;73 as svc_period,&lt;BR /&gt;74 mbr_num,&lt;BR /&gt;75 category_cd as condition&lt;BR /&gt;76 from datasrc.cp_hev2_acty&lt;BR /&gt;77 where svc_period in ('1','2') and&lt;BR /&gt;78 identified_ind = 'Y' and&lt;BR /&gt;79 category_cd in&lt;BR /&gt;79 ! ('DIABETES','ASTHMA','CORONARY_ARTERY_DISEASE','CONGESTIVE_HEART_FAIL&lt;BR /&gt;79 ! URE','CHRONIC_OBSTRUCTIVE_PULMONARY_DISEASE')&lt;BR /&gt;80 and &amp;amp;STRUC_KEY_FILTER.&lt;BR /&gt;81 ;&lt;BR /&gt;NOTE: SAS threaded sort was used.&lt;BR /&gt;NOTE: Table JMADA2.JCPENNEY_MEMBER_LIST created, with 8053 rows and 3 columns.&lt;/P&gt;
&lt;P&gt;82 QUIT;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt; real time 8.11 seconds&lt;BR /&gt; user cpu time 0.35 seconds&lt;BR /&gt; system cpu time 0.19 seconds&lt;BR /&gt; memory 9104.00k&lt;BR /&gt; OS Memory 28672.00k&lt;BR /&gt; Timestamp 10/05/2018 11:36:51 AM&lt;BR /&gt; Step Count 29 Switch Count 128&lt;BR /&gt; Page Faults 414&lt;BR /&gt; Page Reclaims 2390&lt;BR /&gt; Page Swaps 0&lt;BR /&gt; Voluntary Context Switches 523&lt;BR /&gt; Involuntary Context Switches 67&lt;BR /&gt; Block Input Operations 0&lt;BR /&gt; Block Output Operations 0&lt;BR /&gt; &lt;BR /&gt;4 The SAS System 11:35 Friday, October 5, 2018&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;83 &lt;BR /&gt;84 PROC SQL;&lt;BR /&gt;85 create table jmada2.&amp;amp;acct._calls as&lt;BR /&gt;86 select&lt;BR /&gt;87 CASE&lt;BR /&gt;88 when svc_period = '1' then 'BASE'&lt;BR /&gt;89 when svc_period = '2' then 'CURR'&lt;BR /&gt;90 else ''&lt;BR /&gt;91 END&lt;BR /&gt;92 as svc_period,&lt;BR /&gt;93 mbr_num,&lt;BR /&gt;94 count(distinct fact_beg_dt) as call_count&lt;BR /&gt;95 from datasrc.cp_hev2_acty&lt;BR /&gt;96 where mbr_num in (select distinct mbr_num from&lt;BR /&gt;96 ! jmada2.&amp;amp;acct._member_list) and&lt;BR /&gt;97 coaching_call_ind = 'Y'&lt;BR /&gt;98 and &amp;amp;STRUC_KEY_FILTER.&lt;BR /&gt;99 group by 1, 2&lt;BR /&gt;100 ;&lt;BR /&gt;ERROR: A lock is not available for JMADA2.JCPENNEY_CALLS.DATA.&lt;BR /&gt;ERROR: Lock held by process 22806732.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 15:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501963#M592</guid>
      <dc:creator>adamsfam1</dc:creator>
      <dc:date>2018-10-05T15:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my program throwing a LOCK error and how do I fix it?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501969#M594</link>
      <description>&lt;P&gt;The dataset might be opened by some other user or might be by you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try LOCK&amp;nbsp;&lt;SPAN&gt;JMADA2.JCPENNEY_CALLS CLEAR; If it is locked by you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When running the above, if you get It is not locked by you then you might ask the person who opened the dataset to close it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 16:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501969#M594</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-10-05T16:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my program throwing a LOCK error and how do I fix it?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501978#M595</link>
      <description>&lt;P&gt;I would check to ensure that your Proc SQL involving that step actually has a quit to end it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unable to get a Lock often indicates&amp;nbsp;you or another person/program is using the file in some manner. So if another program might be running attempting to read or write that data set in that library you could get that message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 16:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501978#M595</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-05T16:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my program throwing a LOCK error and how do I fix it?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501996#M598</link>
      <description>&lt;P&gt;Do a ps -fp&amp;nbsp;&lt;SPAN&gt;22806732 on the server to find out who owns the process that's getting in your way.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 17:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-is-my-program-throwing-a-LOCK-error-and-how-do-I-fix-it/m-p/501996#M598</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-05T17:01:24Z</dc:date>
    </item>
  </channel>
</rss>

