<?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 concatenate strings in separate columns ignoring the blank values in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-concatenate-strings-in-separate-columns-ignoring-the/m-p/866035#M38278</link>
    <description>&lt;P&gt;I have a column called "Name" which stores the 8 states and territories in Australia, all upper-cased and spacing replaced with an underscore (i.e. NEW_SOUTH_WALES, VICTORIA, QUEENSLAND, SOUTH_AUSTRALIA, WESTERN_AUSTRALIA, TASMANIA, NORTHERN_TERRITORY, AUSTRALIAN_CAPITAL_TERRITORY). My aim is to create a separate column where the state names are proper case with spacing, so I created 3 individual columns that split the names.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Word1=propcase(scan(Name,1,'_'));
Word2=propcase(scan(Name,2,'_'));
Word3=propcase(scan(Name,3,'_'));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After this step, I used&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Word=cat(Word1,Word2,Word3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to create the column with space in between. However, it only gives me a blank column instead. How can I resolve this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snap10.png" style="width: 376px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81971iF8844ABC0FBB83CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap10.png" alt="Snap10.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Mar 2023 05:40:42 GMT</pubDate>
    <dc:creator>SASnovice23</dc:creator>
    <dc:date>2023-03-24T05:40:42Z</dc:date>
    <item>
      <title>How to concatenate strings in separate columns ignoring the blank values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-concatenate-strings-in-separate-columns-ignoring-the/m-p/866035#M38278</link>
      <description>&lt;P&gt;I have a column called "Name" which stores the 8 states and territories in Australia, all upper-cased and spacing replaced with an underscore (i.e. NEW_SOUTH_WALES, VICTORIA, QUEENSLAND, SOUTH_AUSTRALIA, WESTERN_AUSTRALIA, TASMANIA, NORTHERN_TERRITORY, AUSTRALIAN_CAPITAL_TERRITORY). My aim is to create a separate column where the state names are proper case with spacing, so I created 3 individual columns that split the names.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Word1=propcase(scan(Name,1,'_'));
Word2=propcase(scan(Name,2,'_'));
Word3=propcase(scan(Name,3,'_'));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After this step, I used&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Word=cat(Word1,Word2,Word3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to create the column with space in between. However, it only gives me a blank column instead. How can I resolve this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snap10.png" style="width: 376px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81971iF8844ABC0FBB83CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snap10.png" alt="Snap10.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 05:40:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-concatenate-strings-in-separate-columns-ignoring-the/m-p/866035#M38278</guid>
      <dc:creator>SASnovice23</dc:creator>
      <dc:date>2023-03-24T05:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate strings in separate columns ignoring the blank values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-concatenate-strings-in-separate-columns-ignoring-the/m-p/866036#M38279</link>
      <description>&lt;P&gt;Use the CATX function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Word = catx(" ",Word1,Word2,Word3);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The extended CAT functions remove leading and trailing blanks on their own.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 06:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-concatenate-strings-in-separate-columns-ignoring-the/m-p/866036#M38279</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-24T06:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to concatenate strings in separate columns ignoring the blank values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-concatenate-strings-in-separate-columns-ignoring-the/m-p/866458#M38311</link>
      <description>&lt;P&gt;You could use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Word = propcase(translate(Name, ' ', '_'));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Don't forget to use the length-statement so that the length of "Word" is sufficient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 06:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-concatenate-strings-in-separate-columns-ignoring-the/m-p/866458#M38311</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-03-27T06:08:04Z</dc:date>
    </item>
  </channel>
</rss>

