<?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 WARNING: Concatenated strings can be at most 32767 characters. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502876#M134300</link>
    <description>&lt;P&gt;Hi all - I googled and only found 1 reference to this specific warning message, which in that case is about SAS "&lt;SPAN&gt;Scalable Performance Data Server" and says that the character string would be truncated to 200 characters and there's a Hotfix.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But I am using regular SAS 9.4, and am using the following within proc sql to create an MD5 hash of many fields in my table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;md5(compress(&lt;BR /&gt;FormDescription||ACRFHDUStateNo||ACRFPIDLName||ACRFPIDMName||ACRFPIDFName||ACRFDemDOB||ACRFHDUFrmCmplDt||&lt;BR /&gt;ACRFHDUPerson||ACRFHDUPersonPhone||ACRFHDUReptHD||ACRFHDURepStatus||ACRFDateSaved||ACRFLockSubmit||ACRFLockSubmitted&lt;BR /&gt;)) as md5_Small format $hex32.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the log, this message is shown in green:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;WARNING: Concatenated strings can be at most 32767 characters.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To check, I created a new variable of all those fields concatenated together, and the longest string wasn't more than 115 characters, and nothing was truncated. When I added that new long concatenated string variable to the proc sql command, the referenced warning message was shown twice in the log.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I haven't seen this particular warning before, and would just like to make sure it won't bite me if I ignore it as it doesn't seem to apply and the data I'm working with would never seem to exceed even 200 characters, getting nowhere near 32k. Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 20:00:44 GMT</pubDate>
    <dc:creator>ucdcrush</dc:creator>
    <dc:date>2018-10-09T20:00:44Z</dc:date>
    <item>
      <title>WARNING: Concatenated strings can be at most 32767 characters.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502876#M134300</link>
      <description>&lt;P&gt;Hi all - I googled and only found 1 reference to this specific warning message, which in that case is about SAS "&lt;SPAN&gt;Scalable Performance Data Server" and says that the character string would be truncated to 200 characters and there's a Hotfix.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But I am using regular SAS 9.4, and am using the following within proc sql to create an MD5 hash of many fields in my table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;md5(compress(&lt;BR /&gt;FormDescription||ACRFHDUStateNo||ACRFPIDLName||ACRFPIDMName||ACRFPIDFName||ACRFDemDOB||ACRFHDUFrmCmplDt||&lt;BR /&gt;ACRFHDUPerson||ACRFHDUPersonPhone||ACRFHDUReptHD||ACRFHDURepStatus||ACRFDateSaved||ACRFLockSubmit||ACRFLockSubmitted&lt;BR /&gt;)) as md5_Small format $hex32.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In the log, this message is shown in green:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;WARNING: Concatenated strings can be at most 32767 characters.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To check, I created a new variable of all those fields concatenated together, and the longest string wasn't more than 115 characters, and nothing was truncated. When I added that new long concatenated string variable to the proc sql command, the referenced warning message was shown twice in the log.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I haven't seen this particular warning before, and would just like to make sure it won't bite me if I ignore it as it doesn't seem to apply and the data I'm working with would never seem to exceed even 200 characters, getting nowhere near 32k. Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 20:00:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502876#M134300</guid>
      <dc:creator>ucdcrush</dc:creator>
      <dc:date>2018-10-09T20:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: Concatenated strings can be at most 32767 characters.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502881#M134301</link>
      <description>Try using a CATT() function instead of || to concatenate the variables. If you're using COMPRESS to trim blanks, it may not be needed either, unless you're trying to remove spaces in the middle of the strings.</description>
      <pubDate>Tue, 09 Oct 2018 20:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502881#M134301</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-09T20:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: Concatenated strings can be at most 32767 characters.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502883#M134302</link>
      <description>Thank you Reeza, that worked to prevent the warning message. But I wonder what you think may have caused the warning in this case, when the data was nowhere near 32k characters long?</description>
      <pubDate>Tue, 09 Oct 2018 20:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502883#M134302</guid>
      <dc:creator>ucdcrush</dc:creator>
      <dc:date>2018-10-09T20:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: Concatenated strings can be at most 32767 characters.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502889#M134303</link>
      <description>&lt;P&gt;To verify this you would need to look at the variable assigned lengths (not after the compress) to see what SAS is expecting. Using || will concatenate with all trailing spaces and such so it can produce a large string if the lengths of the string are set to a large number. You may have had a string that was larger than expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's just a guess though, not really sure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p00iah2thp63bmn1lt20esag14lh.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p00iah2thp63bmn1lt20esag14lh.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 20:34:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502889#M134303</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-09T20:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: Concatenated strings can be at most 32767 characters.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502894#M134304</link>
      <description>Hi Reeza. You're right! Those variables for some reason were 4000 characters each, so I understand why the warning message was showing. Thanks again.</description>
      <pubDate>Tue, 09 Oct 2018 20:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Concatenated-strings-can-be-at-most-32767-characters/m-p/502894#M134304</guid>
      <dc:creator>ucdcrush</dc:creator>
      <dc:date>2018-10-09T20:39:25Z</dc:date>
    </item>
  </channel>
</rss>

