<?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: concatenate char columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782180#M249349</link>
    <description>&lt;P&gt;These cannot be missing character variables, as this works perfectly:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
infile datalines dlm="," dsd truncover;
input (_temp1-_temp10) (:$3.);
Reason_Reject = CATX('-',OF _temp1-_temp10);
datalines;
118,106,201
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maxim 3: Know Your Data. Types, formats, content.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 10:41:43 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-11-24T10:41:43Z</dc:date>
    <item>
      <title>concatenate char columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782178#M249347</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to&amp;nbsp;&lt;SPAN&gt;combine 10 char columns and add a comma separator.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The problem that some columns has null&amp;nbsp; value and then in the resulted field there are&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The resulted value in first row is looking like that::&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;118-106-201-.-.-.-.-.-.-.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would like to see it as&amp;nbsp;&amp;nbsp;118-106-201&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What is the way to do it please?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The code statement that I run is&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Reason_Reject=CATX('-',OF _temp1-_temp10);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 10:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782178#M249347</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-11-24T10:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate char columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782180#M249349</link>
      <description>&lt;P&gt;These cannot be missing character variables, as this works perfectly:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
infile datalines dlm="," dsd truncover;
input (_temp1-_temp10) (:$3.);
Reason_Reject = CATX('-',OF _temp1-_temp10);
datalines;
118,106,201
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maxim 3: Know Your Data. Types, formats, content.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 10:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782180#M249349</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-24T10:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate char columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782181#M249350</link>
      <description>&lt;P&gt;Does _temp4 contain a "." or an actual missing value " " ?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 10:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782181#M249350</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-11-24T10:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate char columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782204#M249364</link>
      <description>I found the reason,  the fields were numeric and then SAS automatically convert them to char during the concatenation process and then value with null value were converted to '.'</description>
      <pubDate>Wed, 24 Nov 2021 12:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782204#M249364</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-11-24T12:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: concatenate char columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782205#M249365</link>
      <description>Add the following option at top of your code.&lt;BR /&gt;&lt;BR /&gt;options missing=' ';</description>
      <pubDate>Wed, 24 Nov 2021 12:30:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/concatenate-char-columns/m-p/782205#M249365</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-11-24T12:30:48Z</dc:date>
    </item>
  </channel>
</rss>

