<?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: Windows Error Code: 87 when downloading data from WRDS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791418#M253486</link>
    <description>&lt;P&gt;Thanks for your reply! The data itself before cleaning is around 40-50gb so I am not able to open it after downloading (straight from WRDS database) given RAM limits. This is why I am attempting to clean it remotely on the WRDS cloud, however, the cleaned dataset is still very large. Perhaps I can try and divide the dataset and download each one as you suggested. Would you happen to know the code which can divide a dataset into 10 approximately same amount of observations (rows) on SAS? Then it can just be appended on top of each other once downloaded.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 13:36:23 GMT</pubDate>
    <dc:creator>liuo1</dc:creator>
    <dc:date>2022-01-21T13:36:23Z</dc:date>
    <item>
      <title>Windows Error Code: 87 when downloading data from WRDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791376#M253474</link>
      <description>&lt;P&gt;Hi SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run into an issue when downloading a large data file after cleaning it with remote connection to WRDS. I am using SAS through Citrix Workspace and connecting to the WRDS cloud. The data file download was estimated to be over 40 hours long and 6 hours in I ran into this error. I have attached the error message below. If anyone has any information on what the issue is and how to fix it, that would be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;liuo1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas_error_msg.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67576iB14C31A22EED0EAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas_error_msg.jpg" alt="sas_error_msg.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 10:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791376#M253474</guid>
      <dc:creator>liuo1</dc:creator>
      <dc:date>2022-01-21T10:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Error Code: 87 when downloading data from WRDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791381#M253476</link>
      <description>&lt;P&gt;traceout.sas7bdat.lck is the lock file used to rewrite the data set.&lt;BR /&gt;Since ht_normal_write returns the error ERROR_INVALID_PARAMETER for this file, I think the process of writing or rewriting the lock file has failed.&lt;BR /&gt;&lt;BR /&gt;I'm assuming your PC is Windows since the destination is \\Client\C$\Users..., but I suspect that the Citrix session disconnected and failed to write locally, or that the WRDS side disconnected.&lt;BR /&gt;&lt;BR /&gt;Since 6 hours is long enough, let alone 40 hours, I think it would be safer to download the desired dataset in a separate process without using SAS and then process it with SAS.&lt;BR /&gt;Or, if you really want to use SAS to download the data, how about dividing the target data set into 10 parts, downloading it 10 times, and then proc append at hand?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 11:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791381#M253476</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-01-21T11:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Error Code: 87 when downloading data from WRDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791418#M253486</link>
      <description>&lt;P&gt;Thanks for your reply! The data itself before cleaning is around 40-50gb so I am not able to open it after downloading (straight from WRDS database) given RAM limits. This is why I am attempting to clean it remotely on the WRDS cloud, however, the cleaned dataset is still very large. Perhaps I can try and divide the dataset and download each one as you suggested. Would you happen to know the code which can divide a dataset into 10 approximately same amount of observations (rows) on SAS? Then it can just be appended on top of each other once downloaded.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 13:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791418#M253486</guid>
      <dc:creator>liuo1</dc:creator>
      <dc:date>2022-01-21T13:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Error Code: 87 when downloading data from WRDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791617#M253600</link>
      <description>&lt;P&gt;try this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%Macro MDivide(in=, out=, cnt=);
  data _null_;
    dsid=open("&amp;amp;in",'I');
    if dsid&amp;gt;0 then do;
      nobs=attrn(dsid,'nlobsf');
      call symputx('nobs',nobs);
      rc=close(dsid);
      call symputx('div',ceil(nobs/&amp;amp;cnt));
    end;
  run;
  %do i=1 %to &amp;amp;cnt;
    %let fstobs=%eval((&amp;amp;i-1)*&amp;amp;div+1);
    %let getobs=%eval(&amp;amp;i*&amp;amp;div);
    data &amp;amp;out&amp;amp;i;
      set &amp;amp;in(firstobs=&amp;amp;fstobs obs=&amp;amp;getobs);
    run;
  %end;
%Mend;

/* example */
%MDivide(in =sashelp.baseball
         ,out=work.outds
         ,cnt=10);

&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;</description>
      <pubDate>Sat, 22 Jan 2022 01:26:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791617#M253600</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-01-22T01:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Error Code: 87 when downloading data from WRDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791627#M253608</link>
      <description>&lt;P&gt;Thanks! I will give it a shot!&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 03:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Windows-Error-Code-87-when-downloading-data-from-WRDS/m-p/791627#M253608</guid>
      <dc:creator>liuo1</dc:creator>
      <dc:date>2022-01-22T03:44:10Z</dc:date>
    </item>
  </channel>
</rss>

