<?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: Trouble importing dat file to SAS (using Studio version) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790324#M253015</link>
    <description>&lt;P&gt;The file probably has TAB characters to make it appear in such neat columns.&amp;nbsp; Also if a person had typed using spaces they probably would have aligned the ones place in the first column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding DSD and DLM='09'x to your INFILE statement after the filename.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't work then run a simple data step to check what is actually in the file.&lt;/P&gt;
&lt;P&gt;Something like this (I can't use your actual filename since you posted photographs of text instead of just copying the text and sharing that).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile '/home/......' obs=4;
  input;
  list;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 15 Jan 2022 06:17:27 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-01-15T06:17:27Z</dc:date>
    <item>
      <title>Trouble importing dat file to SAS (using Studio version)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790322#M253013</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm pretty new to SAS and I'm having difficulty importing this dat file.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-01-14 211641.png" style="width: 553px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67431i9390E9420375AA0A/image-dimensions/553x253?v=v2" width="553" height="253" role="button" title="Screenshot 2022-01-14 211641.png" alt="Screenshot 2022-01-14 211641.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hopefully, everyone can see the upper image. So I used the upper codes to see the output and this is what I get:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-01-14 211607.png" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67432iB215B30FD290C0DA/image-dimensions/480x211?v=v2" width="480" height="211" role="button" title="Screenshot 2022-01-14 211607.png" alt="Screenshot 2022-01-14 211607.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Basically nothing.. I opened up the dat file in txt and there should be 32 observations and you can see the rest:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-01-14 211839.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67433iD5E7DACD0F8F0F4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-01-14 211839.png" alt="Screenshot 2022-01-14 211839.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I googled and searched on youtube to see what I did wrong and I tried several codings but none of them showed me the full data when I check my output window. Oh, and I checked the log and it said invalid data etc etc (sorry they were too long but i'm pretty sure you get the point). Can you tell me what I did wrong? I am a very novice so please be understanding. Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 06:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790322#M253013</guid>
      <dc:creator>eeun1ilee</dc:creator>
      <dc:date>2022-01-15T06:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble importing dat file to SAS (using Studio version)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790324#M253015</link>
      <description>&lt;P&gt;The file probably has TAB characters to make it appear in such neat columns.&amp;nbsp; Also if a person had typed using spaces they probably would have aligned the ones place in the first column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding DSD and DLM='09'x to your INFILE statement after the filename.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't work then run a simple data step to check what is actually in the file.&lt;/P&gt;
&lt;P&gt;Something like this (I can't use your actual filename since you posted photographs of text instead of just copying the text and sharing that).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile '/home/......' obs=4;
  input;
  list;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 15 Jan 2022 06:17:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790324#M253015</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-15T06:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble importing dat file to SAS (using Studio version)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790337#M253022</link>
      <description>&lt;P&gt;One of the basic tools diagnosing issues with reading files is the LOG created by SAS. That usually has lots of pertinent information. Best is to copy as text from the log the entire step, code and all messages, notes,&amp;nbsp; warnings or errors created, then on the forum open a text box using the &amp;lt;/&amp;gt; icon above the message window and paste the text in that box. The text box is important to preserve formatting as the message windows on this forum will reformat text and the text is important as it allows us to copy/paste/edit or highlight bits that are not practically done with images.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did the file have any header information? Even with most of the likely file format issues the first value of 1 on the first record should have been read. UNLESS you have run the code multiple times with different attempts and are getting a warning like this:(example of text copied from Log and pasted into text box)&lt;/P&gt;
&lt;PRE&gt;WARNING: Data set XXXXXX was not replaced because this step was stopped.

&lt;/PRE&gt;
&lt;P&gt;which means that the data set was created, yes not as desired, but the later code is not replacing the previous problem data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also the note at the top of your data set showing only 6 rows makes me suspect you may be having an issue with end of line characters being inconsistent.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 16:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790337#M253022</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-15T16:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble importing dat file to SAS (using Studio version)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790360#M253038</link>
      <description>&lt;P&gt;You need to add the Delimiter to your INFILE statement, like a tab.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile 'path' dlm='09'x truncover;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;PS. Please post your code and log as text, not images in the future. If you post it as text, we can easily copy/paste/&lt;STRONG&gt;fix&lt;/STRONG&gt; it. Otherwise it requires typing it out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412814"&gt;@eeun1ilee&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm pretty new to SAS and I'm having difficulty importing this dat file.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-01-14 211641.png" style="width: 553px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67431i9390E9420375AA0A/image-dimensions/553x253?v=v2" width="553" height="253" role="button" title="Screenshot 2022-01-14 211641.png" alt="Screenshot 2022-01-14 211641.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hopefully, everyone can see the upper image. So I used the upper codes to see the output and this is what I get:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-01-14 211607.png" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67432iB215B30FD290C0DA/image-dimensions/480x211?v=v2" width="480" height="211" role="button" title="Screenshot 2022-01-14 211607.png" alt="Screenshot 2022-01-14 211607.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Basically nothing.. I opened up the dat file in txt and there should be 32 observations and you can see the rest:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-01-14 211839.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67433iD5E7DACD0F8F0F4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-01-14 211839.png" alt="Screenshot 2022-01-14 211839.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I googled and searched on youtube to see what I did wrong and I tried several codings but none of them showed me the full data when I check my output window. Oh, and I checked the log and it said invalid data etc etc (sorry they were too long but i'm pretty sure you get the point). Can you tell me what I did wrong? I am a very novice so please be understanding. Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jan 2022 21:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790360#M253038</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-15T21:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble importing dat file to SAS (using Studio version)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790362#M253039</link>
      <description>Thank you so much! And, will type out the codes next time. Sorry, this was my first time using this forum. I really appreciate your help!&lt;BR /&gt;PS: It worked!</description>
      <pubDate>Sat, 15 Jan 2022 21:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790362#M253039</guid>
      <dc:creator>eeun1ilee</dc:creator>
      <dc:date>2022-01-15T21:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble importing dat file to SAS (using Studio version)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790363#M253040</link>
      <description>The file did not have any header &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; But, thanks to amazing people who replied to my post, I was able to see the dataset! Thank you so much! I really appreciate all your help!</description>
      <pubDate>Sat, 15 Jan 2022 21:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790363#M253040</guid>
      <dc:creator>eeun1ilee</dc:creator>
      <dc:date>2022-01-15T21:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble importing dat file to SAS (using Studio version)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790365#M253041</link>
      <description>Yes, the dlm='09'x and truncover were the magic codes that were missing! Thank you Tom for your help! I really appreciate it!!</description>
      <pubDate>Sat, 15 Jan 2022 21:30:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790365#M253041</guid>
      <dc:creator>eeun1ilee</dc:creator>
      <dc:date>2022-01-15T21:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble importing dat file to SAS (using Studio version)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790543#M253123</link>
      <description>Please pick one of the correct answers (Tom's is perfect) and mark that as a solution. &lt;BR /&gt;</description>
      <pubDate>Mon, 17 Jan 2022 16:24:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trouble-importing-dat-file-to-SAS-using-Studio-version/m-p/790543#M253123</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-17T16:24:42Z</dc:date>
    </item>
  </channel>
</rss>

