<?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: Concat values of Columns names Col1 to ColN where result is greater than 200 Characters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626920#M184965</link>
    <description>&lt;P&gt;EDIT: Kindly Ignore the below comment. Adding a length Statement solved the issue.&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;CATX Only allows 200 Characters.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;When I run the above code i get the below warning message.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;WARNING: In a call to the CATX function, the buffer allocated for the result was not long enough to contain the concatenation of all the arguments. The correct result would contain 1897 characters, but the actual result might either be truncated to 200 character(s) or be completely blank, depending on the calling environment.&amp;nbsp; The following note indicates thee left-most argument that caused truncation&lt;/STRIKE&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2020 17:32:57 GMT</pubDate>
    <dc:creator>anon_pvok</dc:creator>
    <dc:date>2020-02-24T17:32:57Z</dc:date>
    <item>
      <title>Concat values of Columns names Col1 to ColN where result is greater than 200 Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626916#M184962</link>
      <description>&lt;P&gt;I have a data set with Character columns named like Col1, Col2 ... ColN.&lt;/P&gt;&lt;P&gt;I want to concatenate these columns with a deliminator separator.&lt;/P&gt;&lt;P&gt;I tried using catx as mentioned below but the result was greater than 200 Characters, therefore was getting NULL in the resulting Dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA WORK.FINAL (KEEP=IDT KEYWORDS);
SET WORK.TEMP;

KEYWORDS=CATX('~', of COL:);
RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 17:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626916#M184962</guid>
      <dc:creator>anon_pvok</dc:creator>
      <dc:date>2020-02-24T17:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Concat values of Columns names Col1 to ColN where result is greater than 200 Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626918#M184963</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/147219"&gt;@anon_pvok&lt;/a&gt;&amp;nbsp; Not sure what you mean by&lt;EM&gt; "I tried using catx as mentioned below but the result was greater than 200 Characters, therefore was getting NULL in the resulting Dataset."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You could always assign a length using LENGTH statement before your CATX assignment. Am i missing something?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 17:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626918#M184963</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-02-24T17:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Concat values of Columns names Col1 to ColN where result is greater than 200 Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626919#M184964</link>
      <description>&lt;P&gt;The CATX() function does not have a limit of 200 characters. The problem is you did not tell the data step how long to make KEYWORDS. So it had to guess and it guessed to use $200 since you where assigning it the value of a function that can return character values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA FINAL;
  SET TEMP;
  length keywords $32767 ;
  KEYWORDS=CATX('~', of COL:);
  KEEP IDT KEYWORDS ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Feb 2020 17:24:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626919#M184964</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-24T17:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Concat values of Columns names Col1 to ColN where result is greater than 200 Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626920#M184965</link>
      <description>&lt;P&gt;EDIT: Kindly Ignore the below comment. Adding a length Statement solved the issue.&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;CATX Only allows 200 Characters.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;When I run the above code i get the below warning message.&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;WARNING: In a call to the CATX function, the buffer allocated for the result was not long enough to contain the concatenation of all the arguments. The correct result would contain 1897 characters, but the actual result might either be truncated to 200 character(s) or be completely blank, depending on the calling environment.&amp;nbsp; The following note indicates thee left-most argument that caused truncation&lt;/STRIKE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 17:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626920#M184965</guid>
      <dc:creator>anon_pvok</dc:creator>
      <dc:date>2020-02-24T17:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Concat values of Columns names Col1 to ColN where result is greater than 200 Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626924#M184967</link>
      <description>&lt;P&gt;There you go&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/147219"&gt;@anon_pvok&lt;/a&gt;&amp;nbsp; ,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp; has clarified that it isn't a "Limit" rather a default setting. I am pretty certain you could assign a length of upto $32767 bytes, and this number is the limit.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 17:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626924#M184967</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-02-24T17:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Concat values of Columns names Col1 to ColN where result is greater than 200 Characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626925#M184968</link>
      <description>&lt;P&gt;Now my question seems silly, thank you very much. The above mentioned solved my problem.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 17:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concat-values-of-Columns-names-Col1-to-ColN-where-result-is/m-p/626925#M184968</guid>
      <dc:creator>anon_pvok</dc:creator>
      <dc:date>2020-02-24T17:31:30Z</dc:date>
    </item>
  </channel>
</rss>

