<?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 Why do I get the message&amp;quot; the selected file is invalid&amp;quot; when trying to import a dat file in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Why-do-I-get-the-message-quot-the-selected-file-is-invalid-quot/m-p/832687#M35711</link>
    <description>&lt;P&gt;So these are the instructions:&lt;BR /&gt;a) Open the raw data file ParkAttendance.dat in a simple editor such as&lt;BR /&gt;Wordpad and review. In a comment in your program, state the number of&lt;BR /&gt;variables and observations.&lt;BR /&gt;b) Use the IMPORT procedure to read the raw data file into SAS. View the log&lt;BR /&gt;to verify that your data set has the same number of variables an&lt;BR /&gt;observation as you stated in part a.&lt;BR /&gt;c) Print the data set&lt;BR /&gt;Every time I try to import the the dat file I get a message. I am very very new to this. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="import 9-10-22.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75120i7870D23927FB87A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="import 9-10-22.jpg" alt="import 9-10-22.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Sep 2022 21:14:21 GMT</pubDate>
    <dc:creator>KeenKe</dc:creator>
    <dc:date>2022-09-10T21:14:21Z</dc:date>
    <item>
      <title>Why do I get the message" the selected file is invalid" when trying to import a dat file</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-do-I-get-the-message-quot-the-selected-file-is-invalid-quot/m-p/832687#M35711</link>
      <description>&lt;P&gt;So these are the instructions:&lt;BR /&gt;a) Open the raw data file ParkAttendance.dat in a simple editor such as&lt;BR /&gt;Wordpad and review. In a comment in your program, state the number of&lt;BR /&gt;variables and observations.&lt;BR /&gt;b) Use the IMPORT procedure to read the raw data file into SAS. View the log&lt;BR /&gt;to verify that your data set has the same number of variables an&lt;BR /&gt;observation as you stated in part a.&lt;BR /&gt;c) Print the data set&lt;BR /&gt;Every time I try to import the the dat file I get a message. I am very very new to this. Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="import 9-10-22.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75120i7870D23927FB87A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="import 9-10-22.jpg" alt="import 9-10-22.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 21:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-do-I-get-the-message-quot-the-selected-file-is-invalid-quot/m-p/832687#M35711</guid>
      <dc:creator>KeenKe</dc:creator>
      <dc:date>2022-09-10T21:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get the message" the selected file is invalid" when trying to import a dat fi</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-do-I-get-the-message-quot-the-selected-file-is-invalid-quot/m-p/832691#M35712</link>
      <description>&lt;P&gt;It sounds like this is for a class, is that right?&amp;nbsp; When the instruction say to use the "import procedure" the instructor might be expecting you to write SAS code.&amp;nbsp; Has the class shown how to write PROC IMPORT code, e.g.:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import file=...  out=... ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 22:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-do-I-get-the-message-quot-the-selected-file-is-invalid-quot/m-p/832691#M35712</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-09-10T22:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get the message" the selected file is invalid" when trying to import a dat fi</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Why-do-I-get-the-message-quot-the-selected-file-is-invalid-quot/m-p/832694#M35713</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Are you on step A or step B? The window says "Open" and the message is not in the SAS log, so it looks like you have not submitted any code yet.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Step A tells you to open the file in a simple editor. If you want to use SAS Studio to read a .dat file, then you need to right click on the file and choose View as Text File.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Step B tells you to use the Import Procedure -- please note that under the Tasks and Utilities panel, there IS a utility called Import Data, but if you read the documentation here&amp;nbsp;&lt;A href="https://go.documentation.sas.com/api/docsets/webeditorug/3.8/content/webeditorug.pdf" target="_blank"&gt;https://go.documentation.sas.com/api/docsets/webeditorug/3.8/content/webeditorug.pdf&lt;/A&gt;&amp;nbsp;you'll see that it says you may have issues with .DAT files, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1662848309880.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75121i311BEC680CE19F93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1662848309880.png" alt="Cynthia_sas_0-1662848309880.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; However, you can always code the IMPORT Procedure or you can do what the documentation suggests and rename the file as .TXT instead of .DAT In my screen shot below, I show the PROC IMPORT code needed for my file:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1662848940527.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75122iB5706B8BD90C6156/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1662848940527.png" alt="Cynthia_sas_1-1662848940527.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Hope this helps.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 22:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Why-do-I-get-the-message-quot-the-selected-file-is-invalid-quot/m-p/832694#M35713</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-09-10T22:29:22Z</dc:date>
    </item>
  </channel>
</rss>

