<?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: COMPRESS Function Modifier Warning in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/674227#M23526</link>
    <description>This solutions works for me</description>
    <pubDate>Tue, 04 Aug 2020 00:12:40 GMT</pubDate>
    <dc:creator>xinzhou</dc:creator>
    <dc:date>2020-08-04T00:12:40Z</dc:date>
    <item>
      <title>COMPRESS Function Modifier Warning</title>
      <link>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/511057#M2096</link>
      <description>&lt;P&gt;Can someone explain to me why I'm getting the warning that I'm getting?&amp;nbsp; I've tried reading other posts and can't find a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At various times throughout a program, I am passing a parameter that is typically 2-6 characters&amp;nbsp;plus a 3-digit number through a macro.&amp;nbsp; In the macro, I am trying to extract just the digits.&amp;nbsp; I'm trying to use the A modifier in the compress() function, but&amp;nbsp;I get a warning that appears twice with every pass of the macro:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: In a call to the COMPRESS function or routine, the modifier "'" not valid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The warning isn't influencing the output (as you can see in the log), but I still want to understand the warning:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;6968   %macro check (dsin=);
6969       %let checkval=%sysfunc(compress(&amp;amp;dsin.,'','a'));
6970       %put CHECKVAL=~~~&amp;amp;checkval.~~~;
6971   %mend check;
6972
6973
6974   %check (dsin=AE001);
WARNING: In a call to the COMPRESS function or routine, the modifier "'" not valid.
WARNING: In a call to the COMPRESS function or routine, the modifier "'" not valid.
CHECKVAL=~~~001~~~&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is a very small portion of the macro I am running with various test cases for the input parameter:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro check (dsin=);
	%let checkval=%sysfunc(compress(&amp;amp;dsin.,'','a'));
	%put CHECKVAL=~~~&amp;amp;checkval.~~~;
%mend check;

%check (dsin=AE001);
%check (dsin=AE002);
%check (dsin=AE003);
%check (dsin=AE004);
%check (dsin=AE005);
%check (dsin=CFAE003);
%check (dsin=AE003);
%check (dsin=AE004);
%check (dsin=AE011);
%check (dsin=BF012);
%check (dsin=ZQ014);
%check (dsin=LKNM016);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 15:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/511057#M2096</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2018-11-07T15:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS Function Modifier Warning</title>
      <link>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/511059#M2097</link>
      <description>&lt;P&gt;syntax check&lt;/P&gt;
&lt;P&gt;Try-&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token number"&gt;6968&lt;/SPAN&gt;   &lt;SPAN class="token macrobound"&gt;%macro&lt;/SPAN&gt; check &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;dsin&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token number"&gt;6969&lt;/SPAN&gt;       &lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; checkval&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token macrostatement"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;compress&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;dsin&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,  &lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;a&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token number"&gt;6970&lt;/SPAN&gt;       &lt;SPAN class="token macrostatement"&gt;%put&lt;/SPAN&gt; CHECKVAL&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;~&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;~&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;~&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;checkval&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;~&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;~&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;~&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token number"&gt;6971&lt;/SPAN&gt;   &lt;SPAN class="token macrobound"&gt;%mend&lt;/SPAN&gt; check&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token number"&gt;6972&lt;/SPAN&gt;
&lt;SPAN class="token number"&gt;6973&lt;/SPAN&gt;
&lt;SPAN class="token number"&gt;6974&lt;/SPAN&gt;   &lt;SPAN class="token macroname"&gt;%check&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;dsin&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;AE001&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 15:53:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/511059#M2097</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-11-07T15:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS Function Modifier Warning</title>
      <link>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/511061#M2098</link>
      <description>&lt;P&gt;This works for me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro check (dsin=);
	%let checkval=%sysfunc(compress(&amp;amp;dsin,,ai));
	%put CHECKVAL=~~~&amp;amp;checkval.~~~;
%mend check;

%check (dsin=AE001)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I added i modifier to your a to ignore case sensitive operation&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 15:55:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/511061#M2098</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-11-07T15:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS Function Modifier Warning</title>
      <link>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/511062#M2099</link>
      <description>&lt;P&gt;Oh my goodness.&amp;nbsp; It was just the single quotes around the A modifier?&amp;nbsp; I was trying so many different things like quotes around the &amp;amp;dsin. parameter or quotes around blank space in the 2nd compress parameter.&amp;nbsp; Nothing was working, but removing the quotes around the modifier did the trick.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 15:55:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/511062#M2099</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2018-11-07T15:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS Function Modifier Warning</title>
      <link>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/674227#M23526</link>
      <description>This solutions works for me</description>
      <pubDate>Tue, 04 Aug 2020 00:12:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/674227#M23526</guid>
      <dc:creator>xinzhou</dc:creator>
      <dc:date>2020-08-04T00:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: COMPRESS Function Modifier Warning</title>
      <link>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/718607#M27619</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74"&gt;@djbateman&lt;/a&gt;, Thanks! it helped me resolve the same warning.</description>
      <pubDate>Thu, 11 Feb 2021 14:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/COMPRESS-Function-Modifier-Warning/m-p/718607#M27619</guid>
      <dc:creator>Sukesh33</dc:creator>
      <dc:date>2021-02-11T14:25:08Z</dc:date>
    </item>
  </channel>
</rss>

