<?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: Bufsize for long concatination in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Bufsize-for-long-concatination/m-p/952965#M372408</link>
    <description>&lt;P&gt;30 variables of length 32: 30*32 =960 characters plus 29 commas=989 characters. Your length is a tad excessive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The message you received is because by default the CATX function will use 200 as the default length if the length of the target variable is not set. So you tried to cram about 989 into 200 spaces and get the message.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2024 15:28:22 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-12-09T15:28:22Z</dc:date>
    <item>
      <title>Bufsize for long concatination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bufsize-for-long-concatination/m-p/952921#M372391</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We would like to use CATX &amp;nbsp;for concatenation of 30 words, each word has about 32 characters.&lt;/P&gt;
&lt;P&gt;The input SAS file matrix&amp;nbsp; has col1, col2 until col30 variables. The log mentions an issue with buffersize.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;code:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;options bufsize=MAX ;&lt;/P&gt;
&lt;P&gt;data _null_ ;&lt;BR /&gt;set matrix ;&lt;BR /&gt;want = catx(", ", of col:) ;&lt;BR /&gt;run ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;log:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;WARNING: In a call to the CATX function, the buffer allocated for the result was not long enough to contain the concatenation of &lt;BR /&gt;all the arguments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;available&lt;/STRONG&gt;;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;We were able to create the concatination with simple code&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want = col1||col2|| until ||col30&lt;/P&gt;
&lt;P&gt;However the automation is important and the number of columns may change in the future from 30 to 35.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate your advice.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 05:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bufsize-for-long-concatination/m-p/952921#M372391</guid>
      <dc:creator>J111</dc:creator>
      <dc:date>2024-12-09T05:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Bufsize for long concatination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bufsize-for-long-concatination/m-p/952922#M372392</link>
      <description>&lt;P&gt;This works !&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set matrix ;&lt;BR /&gt;length want $32767;&lt;BR /&gt;want =catx(", ", of col:) ;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 06:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bufsize-for-long-concatination/m-p/952922#M372392</guid>
      <dc:creator>J111</dc:creator>
      <dc:date>2024-12-09T06:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Bufsize for long concatination</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bufsize-for-long-concatination/m-p/952965#M372408</link>
      <description>&lt;P&gt;30 variables of length 32: 30*32 =960 characters plus 29 commas=989 characters. Your length is a tad excessive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The message you received is because by default the CATX function will use 200 as the default length if the length of the target variable is not set. So you tried to cram about 989 into 200 spaces and get the message.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 15:28:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bufsize-for-long-concatination/m-p/952965#M372408</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-12-09T15:28:22Z</dc:date>
    </item>
  </channel>
</rss>

