<?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: DATA STEP problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87088#M257103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mispoke, list and formatted input are mixed often enough I don't differentiate between them all the time. Your input is Formatted input; the period with the 5 makes it a numeric format with no decimals. You have not set a line pointer which would be indicated with either @n or +n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See what you get with&lt;/P&gt;&lt;P&gt;input @2 var ;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;input @5 var ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Sep 2013 16:09:44 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2013-09-19T16:09:44Z</dc:date>
    <item>
      <title>DATA STEP problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87082#M257097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Contents of a.txt&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;22&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;333&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;4444&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;55555&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;But when i run this code :&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;data numbers;&lt;/P&gt;&lt;P&gt;infile ’c:\a.txt’; &lt;/P&gt;&lt;P&gt;input var 5.;&lt;/P&gt;&lt;P&gt;/* list */ ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;the data in numbers.sas is saved as :&lt;/P&gt;&lt;P&gt; var&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" style="border: 1px solid rgb(0, 0, 0); width: 69px; height: 91px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;var1&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;333&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;55555&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i use the list the input buffer is somewhat like this :&lt;/P&gt;&lt;P&gt;RULE:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 14pt;"&gt; ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 333 3&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 55555 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 20:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87082#M257097</guid>
      <dc:creator>Kushal_1991</dc:creator>
      <dc:date>2013-09-18T20:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: DATA STEP problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87083#M257098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the 5. from the input statement and it reads in fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you need the 5.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 20:46:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87083#M257098</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-09-18T20:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: DATA STEP problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87084#M257099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You used list input which defaults to using spaces as delimiters between variables.&lt;/P&gt;&lt;P&gt;To read the first 5 characters as a single text value you want&lt;/P&gt;&lt;P&gt;input var $ 1-5;&lt;/P&gt;&lt;P&gt;The $ says to read it as character and the 1-5 says to read everything in those 5 columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 21:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87084#M257099</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-09-18T21:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: DATA STEP problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87085#M257100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Reeza I know without using 5. it will work fine......i just want to see how the buffer is reading the data. Actually I want to find out what is the default method of sas&amp;nbsp; during column input when there is less no. of columns in an observation than specified in the input statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 05:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87085#M257100</guid>
      <dc:creator>Kushal_1991</dc:creator>
      <dc:date>2013-09-19T05:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: DATA STEP problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87086#M257101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;@Reeza I know without using 5. it will work fine......i just want to see how the buffer is reading the data. Actually I want to find out what is the default method of sas&amp;nbsp; during column input when there is less no. of columns in an observation than specified in the input statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 05:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87086#M257101</guid>
      <dc:creator>Kushal_1991</dc:creator>
      <dc:date>2013-09-19T05:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: DATA STEP problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87087#M257102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@ballardw, Its not a list input, lists dont generally use any pointer control. var $ 1-5 is column method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 05:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87087#M257102</guid>
      <dc:creator>Kushal_1991</dc:creator>
      <dc:date>2013-09-19T05:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: DATA STEP problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87088#M257103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mispoke, list and formatted input are mixed often enough I don't differentiate between them all the time. Your input is Formatted input; the period with the 5 makes it a numeric format with no decimals. You have not set a line pointer which would be indicated with either @n or +n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See what you get with&lt;/P&gt;&lt;P&gt;input @2 var ;&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;input @5 var ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 16:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DATA-STEP-problem/m-p/87088#M257103</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-09-19T16:09:44Z</dc:date>
    </item>
  </channel>
</rss>

