<?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: Reading/Formatting SAS dataset in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436826#M4631</link>
    <description>And one last thing, you're currently reading them all as character (with the $ sign), you may want them to be numeric if you want to summarize or add them.</description>
    <pubDate>Tue, 13 Feb 2018 19:32:17 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-02-13T19:32:17Z</dc:date>
    <item>
      <title>Reading/Formatting SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436819#M4628</link>
      <description>&lt;P&gt;num Y x1 x2 x3 x4&lt;BR /&gt;1 11 1 0 0 0&lt;BR /&gt;2 17 1 0 0 0&lt;BR /&gt;3 16 1 0 0 0&lt;BR /&gt;4 14 1 0 0 0&lt;BR /&gt;5 15 1 0 0 0&lt;BR /&gt;6 12 2 1 0 0&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please note:&lt;BR /&gt;I read the above-named dataset (also attached for proper viewing) saved as ak.txt into SAS University edition and SAS did not read the dataset correctly.&lt;/P&gt;&lt;P&gt;This is the code I used:&lt;BR /&gt;72&lt;BR /&gt;73 data project;&lt;BR /&gt;74 infile "/folders/myfolders/ak.txt";&lt;BR /&gt;75 input num$ y$ x1$ x2$ x3$ x4$ x5$ x6$;&lt;BR /&gt;76 run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is the output I obtained:&lt;/P&gt;&lt;P&gt;1 Y x1 x2 x3 x4 1 11 1&lt;BR /&gt;2 2 17 1 0 0 0 3 16&lt;BR /&gt;3 4 14 1 0 0 0 5 15&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any ideas to solve this problem for SAS to give the right output,please?&lt;/P&gt;&lt;P&gt;This is the log:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: LOST CARD.&lt;BR /&gt;num=6 y=12 x1=2 x2=1 x3=0 x4=0 x5= x6= _ERROR_=1 _N_=4&lt;BR /&gt;NOTE: 7 records were read from the infile "/folders/myfolders/ak.txt".&lt;BR /&gt;The minimum record length was 22.&lt;BR /&gt;The maximum record length was 22.&lt;BR /&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;BR /&gt;NOTE: The data set WORK.PROJECT has 3 observations and 8 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 19:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436819#M4628</guid>
      <dc:creator>ak2011</dc:creator>
      <dc:date>2018-02-13T19:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reading/Formatting SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436822#M4629</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;num Y x1 x2 x3 x4&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;input num$ y$ x1$ x2$ x3$ x4$ x5$ x6$;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You're showing different number of variables, do you only have 4 or 6? It looks like it doesn't align so that's possibly your issue. The note indicates this as well:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/STRONG&gt;&lt;/FONT&gt;&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/190754"&gt;@ak2011&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;num Y x1 x2 x3 x4&lt;BR /&gt;1 11 1 0 0 0&lt;BR /&gt;2 17 1 0 0 0&lt;BR /&gt;3 16 1 0 0 0&lt;BR /&gt;4 14 1 0 0 0&lt;BR /&gt;5 15 1 0 0 0&lt;BR /&gt;6 12 2 1 0 0&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Please note:&lt;BR /&gt;I read the above-named dataset (also attached for proper viewing) saved as ak.txt into SAS University edition and SAS did not read the dataset correctly.&lt;/P&gt;
&lt;P&gt;This is the code I used:&lt;BR /&gt;72&lt;BR /&gt;73 data project;&lt;BR /&gt;74 infile "/folders/myfolders/ak.txt";&lt;BR /&gt;75 input num$ y$ x1$ x2$ x3$ x4$ x5$ x6$;&lt;BR /&gt;76 run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;This is the output I obtained:&lt;/P&gt;
&lt;P&gt;1 Y x1 x2 x3 x4 1 11 1&lt;BR /&gt;2 2 17 1 0 0 0 3 16&lt;BR /&gt;3 4 14 1 0 0 0 5 15&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Any ideas to solve this problem for SAS to give the right output,please?&lt;/P&gt;
&lt;P&gt;This is the log:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: LOST CARD.&lt;BR /&gt;num=6 y=12 x1=2 x2=1 x3=0 x4=0 x5= x6= _ERROR_=1 _N_=4&lt;BR /&gt;NOTE: 7 records were read from the infile "/folders/myfolders/ak.txt".&lt;BR /&gt;The minimum record length was 22.&lt;BR /&gt;The maximum record length was 22.&lt;BR /&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;BR /&gt;NOTE: The data set WORK.PROJECT has 3 observations and 8 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 19:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436822#M4629</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-13T19:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading/Formatting SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436824#M4630</link>
      <description>&lt;P&gt;use&amp;nbsp;FIRSTOBS=2 in your infile statement&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 19:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436824#M4630</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-02-13T19:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading/Formatting SAS dataset</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436826#M4631</link>
      <description>And one last thing, you're currently reading them all as character (with the $ sign), you may want them to be numeric if you want to summarize or add them.</description>
      <pubDate>Tue, 13 Feb 2018 19:32:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Reading-Formatting-SAS-dataset/m-p/436826#M4631</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-13T19:32:17Z</dc:date>
    </item>
  </channel>
</rss>

