<?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: Blanks in first few columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/293214#M60962</link>
    <description>&lt;P&gt;you may check the contents of ID by PUT ID $HEX6. to the log.&lt;/P&gt;&lt;P&gt;Locate the statement at the end of INPUT statement.&lt;/P&gt;&lt;P&gt;In case of TAB you will see '09'x in the 1st character;&lt;/P&gt;&lt;P&gt;What do you get in the log ?&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2016 18:34:00 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-08-22T18:34:00Z</dc:date>
    <item>
      <title>Blanks in first few columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292888#M60871</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 lines of data below. The 1st three characters are for ID, however 2nd row is missing the ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I read this file properly with the INFILE statement? MISSOVER doesn't work in this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;193F1010790815950407011206811&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;M1015950215960408009805410&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 20 Aug 2016 08:31:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292888#M60871</guid>
      <dc:creator>ovonel</dc:creator>
      <dc:date>2016-08-20T08:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Blanks in first few columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292889#M60872</link>
      <description>&lt;PRE&gt;
Using column input method:


data have;
input id $ 1-3 sex $ 4-4 others $ 5-30;
cards;
193F1010790815950407011206811
   M1015950215960408009805410
;
run;

&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Aug 2016 09:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292889#M60872</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-20T09:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Blanks in first few columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292891#M60874</link>
      <description>&lt;P&gt;Hi. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am aware of column input, however M10 becomes the ID and the rest moves to the left.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID in 2nd row is supposed to be blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The MISSOVER in infile does not help.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Aug 2016 10:32:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292891#M60874</guid>
      <dc:creator>ovonel</dc:creator>
      <dc:date>2016-08-20T10:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Blanks in first few columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292896#M60875</link>
      <description>&lt;P&gt;change your input line to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;input @1&amp;nbsp;ID $CHAR3.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @4 sex $1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;@5 others $char26.&lt;/P&gt;&lt;P&gt;&amp;nbsp;;&lt;/P&gt;&lt;P&gt;the&amp;nbsp;@ assigns from which postion to read&amp;nbsp;&lt;/P&gt;&lt;P&gt;the informat $CHAR3. means to read 3 characters without any alignment of data&lt;/P&gt;&lt;P&gt;othrwise, the default of input statement is to align the data to left.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you may change read sex as 1. if you preffer it numeric, instead $1. or $char1. as a character.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shmuel&lt;/P&gt;</description>
      <pubDate>Sat, 20 Aug 2016 12:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292896#M60875</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-20T12:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Blanks in first few columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292913#M60884</link>
      <description>&lt;P&gt;Both of the suggestions you have received are viable approaches. &amp;nbsp;If you get M10 as the value of ID, something is different than what you have presented. &amp;nbsp;Maybe M10 is actually in columns 1 through 3. &amp;nbsp;Maybe you tried a different INPUT statement. &amp;nbsp;But the suggestions you have received work properly on the data you have shown.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Aug 2016 15:30:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292913#M60884</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-20T15:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Blanks in first few columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292948#M60892</link>
      <description>&lt;PRE&gt;
If that was true , then the second row maybe don't have blanks before M10.
You should check your data firstly and Post some real data here .


&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Aug 2016 01:52:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/292948#M60892</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-21T01:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Blanks in first few columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/293176#M60945</link>
      <description>&lt;P&gt;Any chance that is a tab and not 3 spaces?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And what does your current infile and input statement look like?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 16:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/293176#M60945</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-22T16:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Blanks in first few columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/293214#M60962</link>
      <description>&lt;P&gt;you may check the contents of ID by PUT ID $HEX6. to the log.&lt;/P&gt;&lt;P&gt;Locate the statement at the end of INPUT statement.&lt;/P&gt;&lt;P&gt;In case of TAB you will see '09'x in the 1st character;&lt;/P&gt;&lt;P&gt;What do you get in the log ?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 18:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blanks-in-first-few-columns/m-p/293214#M60962</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-22T18:34:00Z</dc:date>
    </item>
  </channel>
</rss>

