<?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: Concocanate character function in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Concocanate-character-function/m-p/377282#M65449</link>
    <description>&lt;P&gt;A few minor issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, the length of FIRST and SECOND is not $2.&amp;nbsp; Rather, they have the same length as DZP_DBC_SPECIALISME.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, the CAT function does not remove leading and trailing blanks (although CATS would do that).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So that's why the incoming strings won't fit into 4 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Superseding all of this, why not just use the simple method:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;specialty = compress(DZP_DBC_SPECIALISME, '.');&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2017 12:33:22 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-07-19T12:33:22Z</dc:date>
    <item>
      <title>Concocanate character function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Concocanate-character-function/m-p/377273#M65447</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;I am trying to take a period out of variable that looks like this: 03.17. My desired output would look like this: 0317.&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;I am getting the following error message.&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;WARNING: In a call to the CAT function, the buffer allocated for the result was not long enough to contain the concatenation of all&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the arguments. The correct result would contain 120 characters, but the actual result might either be truncated to 4&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; character(s) or be completely blank, depending on the calling environment. The following note indicates the left-most&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; argument that caused truncation.&lt;/P&gt;&lt;P&gt;NOTE: Argument 1 to function CAT at line 30 column 12 is invalid."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; work.claims;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;set&lt;/SPAN&gt; work.claims;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;length&lt;/SPAN&gt; specialty $&lt;SPAN&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;;&amp;nbsp;&lt;/P&gt;&lt;P&gt;first=substr(DZP_DBC_SPECIALISME,&lt;SPAN&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;SPAN&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;second=substr(DZP_DBC_SPECIALISME,&lt;SPAN&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;SPAN&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;specialty=cat(first,second);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;drop&lt;/SPAN&gt; first;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;drop&lt;/SPAN&gt; second;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 12:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Concocanate-character-function/m-p/377273#M65447</guid>
      <dc:creator>GKati</dc:creator>
      <dc:date>2017-07-19T12:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Concocanate character function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Concocanate-character-function/m-p/377281#M65448</link>
      <description>&lt;PRE&gt;specialty = compress(DZP_DBC_SPECIALISME,'.');&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Jul 2017 12:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Concocanate-character-function/m-p/377281#M65448</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-07-19T12:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Concocanate character function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Concocanate-character-function/m-p/377282#M65449</link>
      <description>&lt;P&gt;A few minor issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, the length of FIRST and SECOND is not $2.&amp;nbsp; Rather, they have the same length as DZP_DBC_SPECIALISME.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, the CAT function does not remove leading and trailing blanks (although CATS would do that).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So that's why the incoming strings won't fit into 4 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Superseding all of this, why not just use the simple method:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;specialty = compress(DZP_DBC_SPECIALISME, '.');&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 12:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Concocanate-character-function/m-p/377282#M65449</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-19T12:33:22Z</dc:date>
    </item>
  </channel>
</rss>

