<?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: problem with blankspaces in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/problem-with-blankspaces/m-p/235563#M43126</link>
    <description>&lt;P&gt;It sounds like you have a few misconceptions.&amp;nbsp; Consider these basic concepts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both KON and UTB have a length of 8 characters.&amp;nbsp; That's the default length assigned for the style of INPUT statement that you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you refer to a variable, trailing blanks don't matter.&amp;nbsp; These statements always find the same matches:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if utb='GY' then do;&lt;/P&gt;
&lt;P&gt;if utb='GY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When SAS detects that it is comparing character strings that have different lengths, it automatically pads the shorter string with blanks to make the lengths equal.&amp;nbsp; (That is, for purposes of making the comparison ... it is not actually changing the values of any variables.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does that change the questions that you want to ask?&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2015 21:33:02 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2015-11-19T21:33:02Z</dc:date>
    <item>
      <title>problem with blankspaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-blankspaces/m-p/235551#M43124</link>
      <description>&lt;P&gt;here is the deal: I am creating a table with some variables and the 'observations' are read from a .txt file here is my code f&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data pesek;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; infile 'a path'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; input id kon $ alder utb $@@;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ok that works out fine however it is adding a blankspace to each observation in my variable 'utb' which is a problem. If I now add data to this existing table with the INPUT statement &amp;nbsp;for example &amp;nbsp;I add: 29 M 20 GY &amp;nbsp;it will not create extra blankspace to GY which means that any observation in my table which has GY+blankspace will not be "the same" as the GY which I added with the input statement since one has the blankspace and the other one doesnt&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what can I do?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 21:00:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-blankspaces/m-p/235551#M43124</guid>
      <dc:creator>dan12345</dc:creator>
      <dc:date>2015-11-19T21:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: problem with blankspaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-blankspaces/m-p/235558#M43125</link>
      <description>&lt;P&gt;It is very hard to resolve a data reading issue without example data. Provide a few lines of data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how are you "adding" data? Append, merge, update or something else? I'm pretty sure I don't understand your limitation/problem as stated.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 21:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-blankspaces/m-p/235558#M43125</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-19T21:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem with blankspaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problem-with-blankspaces/m-p/235563#M43126</link>
      <description>&lt;P&gt;It sounds like you have a few misconceptions.&amp;nbsp; Consider these basic concepts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both KON and UTB have a length of 8 characters.&amp;nbsp; That's the default length assigned for the style of INPUT statement that you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you refer to a variable, trailing blanks don't matter.&amp;nbsp; These statements always find the same matches:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if utb='GY' then do;&lt;/P&gt;
&lt;P&gt;if utb='GY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When SAS detects that it is comparing character strings that have different lengths, it automatically pads the shorter string with blanks to make the lengths equal.&amp;nbsp; (That is, for purposes of making the comparison ... it is not actually changing the values of any variables.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does that change the questions that you want to ask?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 21:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problem-with-blankspaces/m-p/235563#M43126</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-19T21:33:02Z</dc:date>
    </item>
  </channel>
</rss>

