<?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: Input statement (aligned column data) truncates last column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-aligned-column-data-truncates-last-column/m-p/591559#M169482</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/224992"&gt;@franriv&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your data elements don't start in the columns you think they do. You're just "lucky" that your strings are shorter than your field lengths so the issue only surfaces in the last column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bigger issue:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EXPANDTABS assumes Tab Stops every 8 characters. It doesn't look like that was the tab stop setting in the editor you've used.&lt;/P&gt;
&lt;P&gt;Much more discussion and resolution options &lt;A href="https://communities.sas.com/t5/SAS-Programming/Replace-tabs-with-equal-number-of-spaces/td-p/226221" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2019 14:42:57 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-09-25T14:42:57Z</dc:date>
    <item>
      <title>Input statement (aligned column data) truncates last column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-aligned-column-data-truncates-last-column/m-p/591539#M169471</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data testing;
	input Fiscal $ 1-16 Marca $ 17-36
		AssetTypeSegment $ 37-60 Brand $ 61-73;
	infile datalines expandtabs truncover firstobs=2;
	datalines;
Fiscal      	Marca          		Segment           		Brand
ACCESORIOS  	ACCESORIOS     		Non-Automotive    		Not Defined
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-09-25 09_13_22-franriv_ziris_0925xC - SAS Enterprise Guide.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32732i7CABE56B66D87328/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-09-25 09_13_22-franriv_ziris_0925xC - SAS Enterprise Guide.png" alt="2019-09-25 09_13_22-franriv_ziris_0925xC - SAS Enterprise Guide.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this record, I'm expecting Brand='Not Defined'&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 14:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-statement-aligned-column-data-truncates-last-column/m-p/591539#M169471</guid>
      <dc:creator>franriv</dc:creator>
      <dc:date>2019-09-25T14:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Input statement (aligned column data) truncates last column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-aligned-column-data-truncates-last-column/m-p/591558#M169481</link>
      <description>&lt;P&gt;If your data has tabs then reading with fixed columns is somewhat problematic and you are likely better off to use list input.&lt;/P&gt;
&lt;P&gt;It can take a bit of practice to "count columns" correctly when the tabs have to be expanded logically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the copy and paste from the forum to my editor is likely converting tabs to spaces&amp;nbsp;then I cannot duplicate your result.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 14:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-statement-aligned-column-data-truncates-last-column/m-p/591558#M169481</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-25T14:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Input statement (aligned column data) truncates last column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-statement-aligned-column-data-truncates-last-column/m-p/591559#M169482</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/224992"&gt;@franriv&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your data elements don't start in the columns you think they do. You're just "lucky" that your strings are shorter than your field lengths so the issue only surfaces in the last column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bigger issue:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EXPANDTABS assumes Tab Stops every 8 characters. It doesn't look like that was the tab stop setting in the editor you've used.&lt;/P&gt;
&lt;P&gt;Much more discussion and resolution options &lt;A href="https://communities.sas.com/t5/SAS-Programming/Replace-tabs-with-equal-number-of-spaces/td-p/226221" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 14:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-statement-aligned-column-data-truncates-last-column/m-p/591559#M169482</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-25T14:42:57Z</dc:date>
    </item>
  </channel>
</rss>

