<?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: File is in use, /folders/myfolders/ECST131/testscores.sas7bdat. in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298932#M1134</link>
    <description>&lt;P&gt;When working through the Statistics 1, demo, I received the above error message. Following are the data steps statements:&lt;/P&gt;
&lt;P&gt;I am using the sas practice files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname statdata '/folders/myfolders/ECST131'; &lt;/P&gt;
&lt;P&gt;data statdata.testscores;&lt;BR /&gt; infile "/folders/myfolders/ECST131/testscores.sas7bdat";&lt;BR /&gt; input Gender SATScore IDNumber;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried several changes but the problem is persistent. I tried to look up in other support forums and communities and tried solutions provided but the error is still there. I got the results after doing the PROC PRINT statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise if I am missing or not doing something basic. I am using SAS Studio 3.5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you, I appreciate it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Murali Sastry&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2016 13:35:23 GMT</pubDate>
    <dc:creator>Murali11</dc:creator>
    <dc:date>2016-09-16T13:35:23Z</dc:date>
    <item>
      <title>Error: File is in use, /folders/myfolders/ECST131/testscores.sas7bdat.</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298932#M1134</link>
      <description>&lt;P&gt;When working through the Statistics 1, demo, I received the above error message. Following are the data steps statements:&lt;/P&gt;
&lt;P&gt;I am using the sas practice files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname statdata '/folders/myfolders/ECST131'; &lt;/P&gt;
&lt;P&gt;data statdata.testscores;&lt;BR /&gt; infile "/folders/myfolders/ECST131/testscores.sas7bdat";&lt;BR /&gt; input Gender SATScore IDNumber;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried several changes but the problem is persistent. I tried to look up in other support forums and communities and tried solutions provided but the error is still there. I got the results after doing the PROC PRINT statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise if I am missing or not doing something basic. I am using SAS Studio 3.5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you, I appreciate it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Murali Sastry&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 13:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298932#M1134</guid>
      <dc:creator>Murali11</dc:creator>
      <dc:date>2016-09-16T13:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error: File is in use, /folders/myfolders/ECST131/testscores.sas7bdat.</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298936#M1135</link>
      <description>&lt;P&gt;Well, the error message really tells you the problem. &amp;nbsp;The file testscores.sas7bdat is process locked by the system. &amp;nbsp;Do you have that file open in SAS? &amp;nbsp;Do you have it open in any other application, does someone else have it opened? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;What happens is when SAS opens a file it gets locked so that file can't be written to whilst its open. &amp;nbsp;Close the file form where ever you have it open. &amp;nbsp;You can try starting a new session, then run the code, make sure the steps you execute have completed sucessfully and you should be fine.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 13:58:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298936#M1135</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-09-16T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error: File is in use, /folders/myfolders/ECST131/testscores.sas7bdat.</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298942#M1136</link>
      <description>&lt;P&gt;What are you attempting to do? That does not look like anything that would come from the demo training.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The line of code;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data statdata.testscores&lt;/P&gt;
&lt;P&gt;says to create a data set named in statdata.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This line&lt;/P&gt;
&lt;P&gt;infile "/folders/myfolders/ECST131/testscores.sas7bdat";&lt;/P&gt;
&lt;P&gt;indicates that there is already a SAS dataset named Testscores in the STATDATA library as the path is the same as the .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The file is locked by SAS because the first line is making sure no process interrupts the activity you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can access that EXISTING data set as statdate.testscores.&lt;/P&gt;
&lt;P&gt;You could create copy or new data set using the SET, to bring in data from a SAS data set instead of INFILE which is to read external files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also try executing the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data work.junk;&lt;/P&gt;
&lt;P&gt;infile "/folders/myfolders/ECST131/testscores.sas7bdat";&lt;BR /&gt; input Gender SATScore IDNumber;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;which you may think would create a data set in the WORK library named junk.&lt;/P&gt;
&lt;P&gt;Errors result because of assumptions about INFILE when nothing except a file name is provided. Namely that it is a text file and the Input statement expects to find blanks between the values to read. The SAS7BDAT is a binary file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data statdata.testscoresTemp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set statdata.testcores;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; keep gender SATScore IDNumber;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc print data=statdata.testscoresTemp;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 14:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298942#M1136</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-16T14:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error: File is in use, /folders/myfolders/ECST131/testscores.sas7bdat.</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298968#M1140</link>
      <description>&lt;P&gt;Hello ballardw:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your solution worked. Thank you very much. I appreciate it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 16:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-File-is-in-use-folders-myfolders-ECST131-testscores/m-p/298968#M1140</guid>
      <dc:creator>Murali11</dc:creator>
      <dc:date>2016-09-16T16:01:50Z</dc:date>
    </item>
  </channel>
</rss>

