<?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: Must I convert a numeric variable to a character variable prior to running CAT? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Must-I-convert-a-numeric-variable-to-a-character-variable-prior/m-p/372884#M276155</link>
    <description>Thank you for the assistance, Reeza.</description>
    <pubDate>Mon, 03 Jul 2017 23:12:16 GMT</pubDate>
    <dc:creator>TristanJ</dc:creator>
    <dc:date>2017-07-03T23:12:16Z</dc:date>
    <item>
      <title>Must I convert a numeric variable to a character variable prior to running CAT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Must-I-convert-a-numeric-variable-to-a-character-variable-prior/m-p/372862#M276153</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS 9.4 (English). I want to concatenate a numeric variable (call it num_var) and a character variable (call it char_var) as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;wanted = cat(char_var,num_var); run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I understand that CAT concatenates character variables. Here is my question: Must I convert the numeric variable to a character variable prior to running CAT? Or, does SAS convert the numeric variable to a character variable when I run the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tristan&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 21:30:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Must-I-convert-a-numeric-variable-to-a-character-variable-prior/m-p/372862#M276153</guid>
      <dc:creator>TristanJ</dc:creator>
      <dc:date>2017-07-03T21:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Must I convert a numeric variable to a character variable prior to running CAT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Must-I-convert-a-numeric-variable-to-a-character-variable-prior/m-p/372870#M276154</link>
      <description>&lt;P&gt;CAT/CATT/CATX/CATS level of functions does do the automatic conversion, but it uses the BEST format, not the format applied to the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This type of information will be laid out in the documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4 class="xis-argument"&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;item&lt;/SPAN&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;specifies a constant, variable, or expression, either character or numeric. &lt;STRONG&gt;If &lt;SPAN class="xis-userSuppliedValue"&gt;item&lt;/SPAN&gt; is numeric, then its value is converted to a character string by using the BEST&lt;SPAN class="xis-userSuppliedValue"&gt;w&lt;/SPAN&gt;. format.&lt;/STRONG&gt; In this case, leading blanks are removed and SAS does not write a note to the log.&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p0wism8jqta3qmn1swtpxrs71e9a.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p0wism8jqta3qmn1swtpxrs71e9a.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 21:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Must-I-convert-a-numeric-variable-to-a-character-variable-prior/m-p/372870#M276154</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-03T21:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Must I convert a numeric variable to a character variable prior to running CAT?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Must-I-convert-a-numeric-variable-to-a-character-variable-prior/m-p/372884#M276155</link>
      <description>Thank you for the assistance, Reeza.</description>
      <pubDate>Mon, 03 Jul 2017 23:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Must-I-convert-a-numeric-variable-to-a-character-variable-prior/m-p/372884#M276155</guid>
      <dc:creator>TristanJ</dc:creator>
      <dc:date>2017-07-03T23:12:16Z</dc:date>
    </item>
  </channel>
</rss>

