<?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 how to align values when concatenating variables of different lengthes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-align-values-when-concatenating-variables-of-different/m-p/783454#M249804</link>
    <description>&lt;P&gt;Dear,&lt;/P&gt;
&lt;P&gt;In&amp;nbsp; my data I need to concatenate four variables. The output should have all values aligned in all rows to display in table. Please suggest. Thank you&lt;/P&gt;
&lt;P&gt;output needed;&lt;/P&gt;
&lt;P&gt;31(25) 37(14) 80.6 8.3&lt;/P&gt;
&lt;P&gt;11(2)&amp;nbsp; &amp;nbsp;12(7)&amp;nbsp; &amp;nbsp;37.8 8.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output getting&lt;/P&gt;
&lt;P&gt;31(25) 37(14) 80.6 8.3&lt;/P&gt;
&lt;P&gt;11(2) 12(7) 37.8 8.2&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    data hav;
           input c1 $1-6 c2 $8-13 r1 $15-18 r2 $21-23 ;
           datalines;
31(25) 37(14) 80.6 58.3
11(2)  12(7)  37.8 18.2
           ;
           
           data want;
           set hav;
           tot=c1||"    "||c2||"    "||r1||"    "||r2;
           run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 01 Dec 2021 19:42:40 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2021-12-01T19:42:40Z</dc:date>
    <item>
      <title>how to align values when concatenating variables of different lengthes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-align-values-when-concatenating-variables-of-different/m-p/783454#M249804</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;
&lt;P&gt;In&amp;nbsp; my data I need to concatenate four variables. The output should have all values aligned in all rows to display in table. Please suggest. Thank you&lt;/P&gt;
&lt;P&gt;output needed;&lt;/P&gt;
&lt;P&gt;31(25) 37(14) 80.6 8.3&lt;/P&gt;
&lt;P&gt;11(2)&amp;nbsp; &amp;nbsp;12(7)&amp;nbsp; &amp;nbsp;37.8 8.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output getting&lt;/P&gt;
&lt;P&gt;31(25) 37(14) 80.6 8.3&lt;/P&gt;
&lt;P&gt;11(2) 12(7) 37.8 8.2&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    data hav;
           input c1 $1-6 c2 $8-13 r1 $15-18 r2 $21-23 ;
           datalines;
31(25) 37(14) 80.6 58.3
11(2)  12(7)  37.8 18.2
           ;
           
           data want;
           set hav;
           tot=c1||"    "||c2||"    "||r1||"    "||r2;
           run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 19:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-align-values-when-concatenating-variables-of-different/m-p/783454#M249804</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2021-12-01T19:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to align values when concatenating variables of different lengthes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-align-values-when-concatenating-variables-of-different/m-p/783460#M249809</link>
      <description>&lt;P&gt;How are you printing the output?&amp;nbsp; If you use a proportional font then the spaces will use less width then the digits or other characters.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 20:34:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-align-values-when-concatenating-variables-of-different/m-p/783460#M249809</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-01T20:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to align values when concatenating variables of different lengthes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-align-values-when-concatenating-variables-of-different/m-p/783529#M249846</link>
      <description>&lt;P&gt;Alignment is one of the reasons I do not create variables containing multiple values. With a separate variable I can use style overrides and custom formats to display columns in a tabular report, such as from Proc Report or Tabulate that aligns and appears to be single values to people without causing all the headaches of data maintenance that such composite valued variables can cause.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 03:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-align-values-when-concatenating-variables-of-different/m-p/783529#M249846</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-02T03:50:04Z</dc:date>
    </item>
  </channel>
</rss>

