<?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 sas7bdat.lck created but not updating in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/sas7bdat-lck-created-but-not-updating/m-p/823751#M81945</link>
    <description>&lt;P&gt;I'm having issues where if I try to run PROC SQL or PROC SORT involving a larger medical claims dataset (~15 GB).&amp;nbsp;I work off a VPN and need to write my data to a remote file storage system. My code submits without error in the log, but will not update in my file libraries.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the code I have been using is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data = lib.large_data;&lt;/P&gt;&lt;P&gt;by ID Admit_date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table lib.merge as&lt;/P&gt;&lt;P&gt;select *&amp;nbsp;&lt;/P&gt;&lt;P&gt;from lib.small_data x&lt;/P&gt;&lt;P&gt;left join lib.large_data y&amp;nbsp;&lt;/P&gt;&lt;P&gt;on x.ID = y.ID;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a file titled &lt;STRONG&gt;lib.large_data.sas7bdat.lck&lt;/STRONG&gt; will be created in my folder, but will not update. What I mean by this is that the file size will initialize at&amp;nbsp; 0-168KB and will not grow any larger, no matter how long I let the code run. I understand that SAS creates .lck files to prevent overwrites, but I'm not sure why this is happening.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is also strange to me is that the code I'm showing has worked previously. I started having this issue in the past week, but I have been using this exact code to do merges for a few months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the PROC SQL statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table lib.merge as&lt;/P&gt;&lt;P&gt;select *&amp;nbsp;&lt;/P&gt;&lt;P&gt;from lib.large data x&amp;nbsp;&lt;/P&gt;&lt;P&gt;where x.ID in (select y.ID from lib.small_data y);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then that allows me at least select correct records from the large dataset, but it's not ideal and I am still not able to sort the resulting dataset (~300 MB).&amp;nbsp; I can run other PROC statements on these datasets just fine. I.e, PROC CONTENTS, PROC MEANS, PROC FREQ, all work, but I can't sort or merge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any idea why this is happening or how to resolve this issue? Any advice would be appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Jul 2022 22:44:21 GMT</pubDate>
    <dc:creator>lynnh20</dc:creator>
    <dc:date>2022-07-17T22:44:21Z</dc:date>
    <item>
      <title>sas7bdat.lck created but not updating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sas7bdat-lck-created-but-not-updating/m-p/823751#M81945</link>
      <description>&lt;P&gt;I'm having issues where if I try to run PROC SQL or PROC SORT involving a larger medical claims dataset (~15 GB).&amp;nbsp;I work off a VPN and need to write my data to a remote file storage system. My code submits without error in the log, but will not update in my file libraries.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the code I have been using is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data = lib.large_data;&lt;/P&gt;&lt;P&gt;by ID Admit_date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table lib.merge as&lt;/P&gt;&lt;P&gt;select *&amp;nbsp;&lt;/P&gt;&lt;P&gt;from lib.small_data x&lt;/P&gt;&lt;P&gt;left join lib.large_data y&amp;nbsp;&lt;/P&gt;&lt;P&gt;on x.ID = y.ID;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a file titled &lt;STRONG&gt;lib.large_data.sas7bdat.lck&lt;/STRONG&gt; will be created in my folder, but will not update. What I mean by this is that the file size will initialize at&amp;nbsp; 0-168KB and will not grow any larger, no matter how long I let the code run. I understand that SAS creates .lck files to prevent overwrites, but I'm not sure why this is happening.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is also strange to me is that the code I'm showing has worked previously. I started having this issue in the past week, but I have been using this exact code to do merges for a few months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the PROC SQL statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table lib.merge as&lt;/P&gt;&lt;P&gt;select *&amp;nbsp;&lt;/P&gt;&lt;P&gt;from lib.large data x&amp;nbsp;&lt;/P&gt;&lt;P&gt;where x.ID in (select y.ID from lib.small_data y);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then that allows me at least select correct records from the large dataset, but it's not ideal and I am still not able to sort the resulting dataset (~300 MB).&amp;nbsp; I can run other PROC statements on these datasets just fine. I.e, PROC CONTENTS, PROC MEANS, PROC FREQ, all work, but I can't sort or merge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any idea why this is happening or how to resolve this issue? Any advice would be appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2022 22:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sas7bdat-lck-created-but-not-updating/m-p/823751#M81945</guid>
      <dc:creator>lynnh20</dc:creator>
      <dc:date>2022-07-17T22:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: sas7bdat.lck created but not updating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sas7bdat-lck-created-but-not-updating/m-p/823755#M81946</link>
      <description>&lt;P&gt;Reading and writing large data files over VPN to remote network storage is a recipe for very poor performance. I assume SAS is running on your local PC? How long was it taking when it was working?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest running a test:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table work.merge as
select * 
from lib.small_data x
left join lib.large_data y 
on x.ID = y.ID;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will test how much faster it is writing to your local hard drive. If it is a lot faster and successful then it will prove that the VPN data connection is the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also this test should be even faster:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.small_data;
  set lib.small_data;
run;

proc sql;
create table work.merge as
select * 
from work.small_data x
left join lib.large_data y 
on x.ID = y.ID;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 00:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sas7bdat-lck-created-but-not-updating/m-p/823755#M81946</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-07-18T00:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: sas7bdat.lck created but not updating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sas7bdat-lck-created-but-not-updating/m-p/823762#M81947</link>
      <description>&lt;P&gt;The lck file is created as soon as the PROC SORT starts, but then the procedure will read the source dataset and populate the utility file in WORK; during this, the lck file will stay unchanged. What you experience is a consequence of reading a dataset over a bad network connection.&lt;/P&gt;
&lt;P&gt;Copy all datasets to a local library first, then do your work, and after that copy the final result back to the network storage.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 04:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sas7bdat-lck-created-but-not-updating/m-p/823762#M81947</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-18T04:44:13Z</dc:date>
    </item>
  </channel>
</rss>

