<?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 The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many arguments in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490581#M128380</link>
    <description>&lt;P&gt;Please see the following code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET NOMOUNTCYR1 = 'AL';&lt;/P&gt;&lt;P&gt;%LET NOMOUNTCYR1_unquoted=%qsysfunc(compress(&amp;amp;NOMOUNTCYR1,%str(%')));&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This successfully removes the single quotes from AL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET NOMOUNTCYR2 = 'GA','MO','NM','OR';&lt;/P&gt;&lt;P&gt;%LET NOMOUNTCYR2_unquoted=%qsysfunc(compress(&amp;amp;NOMOUNTCYR2,%str(%')));&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not, I get the following error:&lt;/P&gt;&lt;P&gt;ERROR: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many arguments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each state abbreviation&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;needs&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to be in quotes in the original macro variable so it can be used in a where statement later on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me so that NOMOUNTCYR2_unquoted resolves to GA, MO, NM, OR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Aug 2018 19:06:55 GMT</pubDate>
    <dc:creator>martyvd</dc:creator>
    <dc:date>2018-08-28T19:06:55Z</dc:date>
    <item>
      <title>The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many arguments</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490581#M128380</link>
      <description>&lt;P&gt;Please see the following code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET NOMOUNTCYR1 = 'AL';&lt;/P&gt;&lt;P&gt;%LET NOMOUNTCYR1_unquoted=%qsysfunc(compress(&amp;amp;NOMOUNTCYR1,%str(%')));&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This successfully removes the single quotes from AL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET NOMOUNTCYR2 = 'GA','MO','NM','OR';&lt;/P&gt;&lt;P&gt;%LET NOMOUNTCYR2_unquoted=%qsysfunc(compress(&amp;amp;NOMOUNTCYR2,%str(%')));&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not, I get the following error:&lt;/P&gt;&lt;P&gt;ERROR: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many arguments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each state abbreviation&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;needs&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to be in quotes in the original macro variable so it can be used in a where statement later on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me so that NOMOUNTCYR2_unquoted resolves to GA, MO, NM, OR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 19:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490581#M128380</guid>
      <dc:creator>martyvd</dc:creator>
      <dc:date>2018-08-28T19:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many argume</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490593#M128386</link>
      <description>&lt;P&gt;Probably an easier way than this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET NOMOUNTCYR2 = 'GA','MO','NM','OR';

%LET NOMOUNTCYR2_unquoted=%sysfunc(dequote(%sysfunc(translate("&amp;amp;nomountcyr2", " ", "'"))));

%put &amp;amp;NOMOUNTCYR2_unquoted; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would say create two separate ones from the start if at all possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
select distinct quote(stateCode, "'"), stateCode 
    into 
        :list1 separated by ",", 
        :list2 separated by ","
from sashelp.zipcode;
quit;

%put List1: &amp;amp;list1.;
%put List2: &amp;amp;list2.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/228746"&gt;@martyvd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Please see the following code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%LET NOMOUNTCYR1 = 'AL';&lt;/P&gt;
&lt;P&gt;%LET NOMOUNTCYR1_unquoted=%qsysfunc(compress(&amp;amp;NOMOUNTCYR1,%str(%')));&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This successfully removes the single quotes from AL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%LET NOMOUNTCYR2 = 'GA','MO','NM','OR';&lt;/P&gt;
&lt;P&gt;%LET NOMOUNTCYR2_unquoted=%qsysfunc(compress(&amp;amp;NOMOUNTCYR2,%str(%')));&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This does not, I get the following error:&lt;/P&gt;
&lt;P&gt;ERROR: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many arguments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each state abbreviation&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;needs&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to be in quotes in the original macro variable so it can be used in a where statement later on.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me so that NOMOUNTCYR2_unquoted resolves to GA, MO, NM, OR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 19:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490593#M128386</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-28T19:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many argume</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490595#M128387</link>
      <description>&lt;P&gt;&amp;nbsp;you missed to bquote&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%LET NOMOUNTCYR2 = 'GA','MO','NM','OR';&lt;/P&gt;
&lt;P&gt;%LET NOMOUNTCYR2_unquoted=%qsysfunc(compress(&lt;STRONG&gt;%bquote&lt;/STRONG&gt;(&amp;amp;NOMOUNTCYR2),%str(%'))); &lt;BR /&gt;%put &amp;amp;NOMOUNTCYR2_unquoted;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 19:41:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490595#M128387</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-28T19:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many argume</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490599#M128389</link>
      <description>&lt;P&gt;or using %superq&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%LET NOMOUNTCYR2 = 'GA','MO','NM','OR';&lt;/P&gt;
&lt;P&gt;%LET NOMOUNTCYR2_unquoted=%qsysfunc(compress(&lt;STRONG&gt;%superq&lt;/STRONG&gt;(NOMOUNTCYR2),%str(%'))); &lt;BR /&gt;%put &amp;amp;NOMOUNTCYR2_unquoted;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 19:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490599#M128389</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-28T19:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many argume</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490606#M128392</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/228746"&gt;@martyvd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each state abbreviation&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;needs&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to be in quotes in the original macro variable so it can be used in a where statement later on.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If your WHERE statement is something like :&lt;/P&gt;
&lt;P&gt;Where state in (&amp;amp;NOMOUNTCYR2.) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you do not need the commas imbedded in the macro variable&amp;nbsp;which are the cause of the too many parameters issue more than likely. The requirement to have commas delimiting items in the IN operator went away maybe in SAS 9.0?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 19:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490606#M128392</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-28T19:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many argume</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490610#M128395</link>
      <description>&lt;P&gt;True, but I failed to mention I also use &amp;amp;NOMOUNTCYR2_unquoted in a output table footnote where I would like the commas to remain.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I specified needing the quotes which I believe are required in the where statement for character variables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 20:12:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490610#M128395</guid>
      <dc:creator>martyvd</dc:creator>
      <dc:date>2018-08-28T20:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many argume</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490741#M128484</link>
      <description>&lt;P&gt;I fully second &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s SQL approach. By far the easier code to read and maintain.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 06:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490741#M128484</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-29T06:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: The function COMPRESS referenced by the %SYSFUNC or %QSYSFUNC macro function has too many argume</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490885#M128589</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/228746"&gt;@martyvd&lt;/a&gt;&amp;nbsp;There are a few solutions posted that seem correct. Please mark one as the solution if your problem is resolved or clarify if something is still not working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 15:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-function-COMPRESS-referenced-by-the-SYSFUNC-or-QSYSFUNC/m-p/490885#M128589</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-29T15:18:00Z</dc:date>
    </item>
  </channel>
</rss>

