<?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: can we concatenate a numeric and character and make it to character in cats or catx? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359910#M84666</link>
    <description>&lt;P&gt;This happens because you are trying to change the variable ADURN's type from numeric to character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can not (and shouldn't try to)&amp;nbsp;change the type of a variable once it has been defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore, call ADURN something else at the left side of the equal sign&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2017 08:59:33 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-05-19T08:59:33Z</dc:date>
    <item>
      <title>can we concatenate a numeric and character and make it to character in cats or catx?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359905#M84662</link>
      <description>&lt;P&gt;i have a variable duration(numeric) and unit(character).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i need to concatenate both and make them into character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ADURN=cats(adurn,aduru);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but this fails as&amp;nbsp;NOTE: Invalid numeric data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there any way to do in cat functions?&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 08:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359905#M84662</guid>
      <dc:creator>vraj1</dc:creator>
      <dc:date>2017-05-19T08:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: can we concatenate a numeric and character and make it to character in cats or catx?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359906#M84663</link>
      <description>&lt;P&gt;like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	duration = 100;
	unit = 'years';
	adurn = cats(duration,unit);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 May 2017 08:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359906#M84663</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-05-19T08:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: can we concatenate a numeric and character and make it to character in cats or catx?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359907#M84664</link>
      <description>&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;. &amp;nbsp;One thing I would add is that it is generally advisable to put() numerics to text and cat the result, as then it is both in your hands what to do with the number, and clear to other users what is happening:&lt;/P&gt;
&lt;PRE&gt;cats(put(number_var,3.),text_var);&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 May 2017 08:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359907#M84664</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-19T08:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: can we concatenate a numeric and character and make it to character in cats or catx?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359908#M84665</link>
      <description>&lt;P&gt;i used a same step but somehow i get the error&lt;/P&gt;
&lt;P&gt;data inc;&lt;BR /&gt; set adae;&lt;BR /&gt; ADURN=cats(adurn,aduru);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ADURN is numeric and lenght as 8 and format as best12.&lt;/P&gt;
&lt;P&gt;ADURU is char and length 40&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt; 959:9&lt;BR /&gt;NOTE: Invalid numeric data, '18Days' , at line 959 column 9.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 08:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359908#M84665</guid>
      <dc:creator>vraj1</dc:creator>
      <dc:date>2017-05-19T08:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: can we concatenate a numeric and character and make it to character in cats or catx?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359910#M84666</link>
      <description>&lt;P&gt;This happens because you are trying to change the variable ADURN's type from numeric to character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can not (and shouldn't try to)&amp;nbsp;change the type of a variable once it has been defined.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore, call ADURN something else at the left side of the equal sign&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 08:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/can-we-concatenate-a-numeric-and-character-and-make-it-to/m-p/359910#M84666</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-05-19T08:59:33Z</dc:date>
    </item>
  </channel>
</rss>

