<?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: Repair damaged dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748434#M235075</link>
    <description>&lt;P&gt;The .sas7bdat files&amp;nbsp;&lt;EM&gt;are&lt;/EM&gt;&amp;nbsp;SAS datasets.&lt;/P&gt;
&lt;P&gt;Can't you restore your dataset from a backup, or recreate it through code?&lt;/P&gt;
&lt;P&gt;If both of these options are not there (which means you are just learning an object lesson about the importance of backups, the hard way), try to get SAS Technical Support involved. They may have more advanced means to retrieve hopelessly damaged datasets.&lt;/P&gt;
&lt;P&gt;BTW, what is the file size of your .sas7bdat file of the damaged dataset?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jun 2021 18:41:51 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-06-16T18:41:51Z</dc:date>
    <item>
      <title>Repair damaged dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748341#M235044</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I'm trying to repair a damaged dataset using the Repair statement but I'm not getting it.&amp;nbsp;&lt;BR /&gt;The dataset was damaged because my computer crashed while i was inserting data to de dataset and now at reading the dataset it says:&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="Seyllia_0-1623851222541.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60424i9C31910724985C02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Seyllia_0-1623851222541.png" alt="Seyllia_0-1623851222541.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing is this is the exact that Repair Statement is made for (&lt;A href="https://www.bing.com/search?q=sas+repair+statement&amp;amp;qs=n&amp;amp;form=QBRE&amp;amp;sp=-1&amp;amp;pq=sas+repair+statme&amp;amp;sc=0-17&amp;amp;sk=&amp;amp;cvid=BF971A94A6EB4A4C985EF260C86D96E0" target="_blank"&gt;https://www.bing.com/search?q=sas+repair+statement&amp;amp;qs=n&amp;amp;form=QBRE&amp;amp;sp=-1&amp;amp;pq=sas+repair+statme&amp;amp;sc=0-17&amp;amp;sk=&amp;amp;cvid=BF971A94A6EB4A4C985EF260C86D96E0&lt;/A&gt;).&lt;BR /&gt;&lt;BR /&gt;But I'm not fiding any example code on how to use it and I don't know what I'm doing wrong to repair the dataset.&lt;BR /&gt;My code is:&lt;/P&gt;&lt;PRE&gt;proc datasets;
   repair schema_name.table_name;
run;&lt;/PRE&gt;&lt;P&gt;Runing this I get this error which I don't know how to avoid it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Seyllia_1-1623851434519.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60425i893EB889743FA606/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Seyllia_1-1623851434519.png" alt="Seyllia_1-1623851434519.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 13:51:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748341#M235044</guid>
      <dc:creator>Seyllia</dc:creator>
      <dc:date>2021-06-16T13:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Repair damaged dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748344#M235045</link>
      <description>&lt;P&gt;PROC DATASET differ a little bit from other procedures - you specify the libref on the PROC DATASETS statement.&lt;/P&gt;
&lt;P&gt;And then refer to the data set name only (without libref) in the REAPAIR statement.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 13:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748344#M235045</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-06-16T13:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Repair damaged dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748351#M235048</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/370529"&gt;@Seyllia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;My code is:&lt;/P&gt;
&lt;PRE&gt;proc datasets;
   repair schema_name.table_name;
run;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's been a while since I've done this, but try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets lib=pa_fraud;
 repair fr006_log_tests;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 14:26:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748351#M235048</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-06-16T14:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Repair damaged dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748393#M235057</link>
      <description>&lt;P&gt;Thank you! It seems to work like that but the dataset still won't open...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any other idea?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 17:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748393#M235057</guid>
      <dc:creator>Seyllia</dc:creator>
      <dc:date>2021-06-16T17:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Repair damaged dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748395#M235058</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/370529"&gt;@Seyllia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you! It seems to work like that but the dataset still won't open...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any other idea?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;1) Restart from a backed-up version of the data set.&lt;/P&gt;
&lt;P&gt;2) Depending on the type of crash you may have some data in the old work library.&lt;/P&gt;
&lt;P&gt;You could run this code:&lt;/P&gt;
&lt;PRE&gt;proc options option=work;
run;&lt;/PRE&gt;
&lt;P&gt;Which will show where your current work library is. It may look something like:&lt;/P&gt;
&lt;PRE&gt; WORK=C:\Users\Owner\AppData\Local\Temp\SAS Temporary Files\_TD5300_DESKTOP-C36D7SF_
 &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Find the location of the SAS Temporary Files and look for an older folder and see if there are data sets there. &lt;/P&gt;
&lt;P&gt;You may want to assign a library to that old location and my recover temporary data from there.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 17:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748395#M235058</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-16T17:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Repair damaged dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748398#M235061</link>
      <description>&lt;P&gt;Didn't work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apart from the actual datasets, i have the .sas7bdat files which I'm not sure what they are. Any way of repairing the dataset from there?&lt;BR /&gt;&lt;BR /&gt;If not, I also found this option&amp;nbsp;&lt;SPAN&gt;DLDMGACTION=FAIL&amp;nbsp; here&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a001043251.htm" target="_blank"&gt;SAS File Management: Repairing Damaged SAS Files,&lt;/A&gt;&amp;nbsp; which might work? How would I use it?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 17:32:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748398#M235061</guid>
      <dc:creator>Seyllia</dc:creator>
      <dc:date>2021-06-16T17:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Repair damaged dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748434#M235075</link>
      <description>&lt;P&gt;The .sas7bdat files&amp;nbsp;&lt;EM&gt;are&lt;/EM&gt;&amp;nbsp;SAS datasets.&lt;/P&gt;
&lt;P&gt;Can't you restore your dataset from a backup, or recreate it through code?&lt;/P&gt;
&lt;P&gt;If both of these options are not there (which means you are just learning an object lesson about the importance of backups, the hard way), try to get SAS Technical Support involved. They may have more advanced means to retrieve hopelessly damaged datasets.&lt;/P&gt;
&lt;P&gt;BTW, what is the file size of your .sas7bdat file of the damaged dataset?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 18:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748434#M235075</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-16T18:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Repair damaged dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748562#M235087</link>
      <description>&lt;P&gt;&amp;nbsp;The file size 22 Gb and I have the code to recompute it but it will take a long time.&lt;BR /&gt;&lt;BR /&gt;Anyway is the option I'm finally taking, thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 21:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repair-damaged-dataset/m-p/748562#M235087</guid>
      <dc:creator>Seyllia</dc:creator>
      <dc:date>2021-06-16T21:08:58Z</dc:date>
    </item>
  </channel>
</rss>

