<?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 data in Datalines in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320698#M70662</link>
    <description>&lt;P&gt;Yes, datalines are always left aligned, so the pointer starts reading your data from column 1:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data test;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; input @1 Subj $3.;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; datalines;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 001&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;^&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Read pointer indicated by ^. &amp;nbsp;Two tips, align the semicolon at column1 also. &amp;nbsp;Instead of using tabs - which can cause confusion and render differently on different editors, use spaces. &amp;nbsp;You can use the option in SAS (assuming you have base - not sure where the option is in Enterprise Guide for instance), with an Enhanced Editor window selected choose Tools-&amp;gt;Options-&amp;gt;Enhanced Editor. &amp;nbsp;And then in the dialog that appears look down to the Tabs section, there is a checkbox for Insert Spaces for Tabs. &amp;nbsp;Check this and when you press tab from then on it will insert the number of spaces defined in Tab Size. &amp;nbsp;Spaces should always render the same across text editors and so your code always appears the same.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2016 09:11:03 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-12-22T09:11:03Z</dc:date>
    <item>
      <title>Reading data in Datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320678#M70656</link>
      <description>&lt;P&gt;When I run&amp;nbsp;the following command in SAS Studio:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; input @1 Subj $3.;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; datalines;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 001&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It returns 00 for the lone entry in Subj; however, if I change $3. to $4., Subj now contains 001. I'm new to SAS programming, so this is probably something obvious, but I'd appreciate any help I can get in understanding what's going on here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 06:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320678#M70656</guid>
      <dc:creator>alhs77st</dc:creator>
      <dc:date>2016-12-22T06:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data in Datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320679#M70657</link>
      <description>it is certainly due to blank spaces present before the value 001. SAS will also consider blank spaces as blank data. Please remove the  space before 001 and then execute. It will read the data as 001 even if you mention $3.</description>
      <pubDate>Thu, 22 Dec 2016 06:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320679#M70657</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2016-12-22T06:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data in Datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320686#M70660</link>
      <description>&lt;P&gt;Thanks -- that was definitely it. SAS was reading the tab at the beginning of the line (automatically inserted by the editor) as a blank character.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 07:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320686#M70660</guid>
      <dc:creator>alhs77st</dc:creator>
      <dc:date>2016-12-22T07:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data in Datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320698#M70662</link>
      <description>&lt;P&gt;Yes, datalines are always left aligned, so the pointer starts reading your data from column 1:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data test;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; input @1 Subj $3.;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; datalines;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 001&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;^&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Read pointer indicated by ^. &amp;nbsp;Two tips, align the semicolon at column1 also. &amp;nbsp;Instead of using tabs - which can cause confusion and render differently on different editors, use spaces. &amp;nbsp;You can use the option in SAS (assuming you have base - not sure where the option is in Enterprise Guide for instance), with an Enhanced Editor window selected choose Tools-&amp;gt;Options-&amp;gt;Enhanced Editor. &amp;nbsp;And then in the dialog that appears look down to the Tabs section, there is a checkbox for Insert Spaces for Tabs. &amp;nbsp;Check this and when you press tab from then on it will insert the number of spaces defined in Tab Size. &amp;nbsp;Spaces should always render the same across text editors and so your code always appears the same.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 09:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-data-in-Datalines/m-p/320698#M70662</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-12-22T09:11:03Z</dc:date>
    </item>
  </channel>
</rss>

