<?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: PROC REPORT and Masking in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306287#M60988</link>
    <description>&lt;P&gt;If you have control over the macro variable generation then it is not much of an issue.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let group = Dummy='Y';
...
groups="Criteria (&amp;amp;group)";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If don't and the value of &amp;amp;GROUP might have double quotes then you can use QUOTE() function to make sure they are properly doubled up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;groups= %sysfunc(quote(Criteria (&amp;amp;group)));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 21 Oct 2016 14:02:27 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2016-10-21T14:02:27Z</dc:date>
    <item>
      <title>PROC REPORT and Masking</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306279#M60984</link>
      <description>&lt;P&gt;Hello I am having trouble masking the following highlighted in yellow:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc report data=safrptshell1 nowd &lt;BR /&gt;...;&lt;/P&gt;
&lt;P&gt;compute groups;&lt;BR /&gt; if &lt;SPAN&gt;groups&lt;/SPAN&gt;='OVERALL' then &lt;BR /&gt; do;&lt;BR /&gt;&lt;FONT color="#FFCC00"&gt;&lt;SPAN&gt;groups&lt;/SPAN&gt;="Criteria&amp;nbsp;(%nrbquote(Dummy = "Y"))";&lt;/FONT&gt;&lt;BR /&gt; call define (_col_, "style/merge", "style=[font_face=&amp;amp;font. fontstyle=italic]");&lt;BR /&gt; end;&lt;BR /&gt; else if strip(&lt;SPAN&gt;groups&lt;/SPAN&gt;) in(...) then &lt;BR /&gt; do;&lt;BR /&gt; call define (_col_, "style/merge", "style=[font_weight=bold]");&lt;BR /&gt; end;&lt;BR /&gt; endcomp;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the following error "ERROR 388-185: Expecting an arithmetic operator." &amp;nbsp;It seems no matter what type of masking I try, the procedure unmasks the block of line before execution. &amp;nbsp;Is there a way to quote/mask this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2016 13:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306279#M60984</guid>
      <dc:creator>dtchoi86</dc:creator>
      <dc:date>2016-10-21T13:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT and Masking</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306281#M60985</link>
      <description>&lt;P&gt;At a guess, just put single quotes around it:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;groups&lt;/SPAN&gt;&lt;SPAN&gt;='Criteria (Dummy = "Y")';&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2016 13:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306281#M60985</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-21T13:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT and Masking</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306282#M60986</link>
      <description>If I were to replace the dummy with a macro:&lt;BR /&gt;%let dummy = Dummy = "Y";&lt;BR /&gt;&lt;BR /&gt;group = 'Criteria (&amp;amp;dummy)';&lt;BR /&gt;&lt;BR /&gt;My guess is that this would not work?  I should have been more clear - sorry.  I would eventually like to put in a macro there.</description>
      <pubDate>Fri, 21 Oct 2016 13:47:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306282#M60986</guid>
      <dc:creator>dtchoi86</dc:creator>
      <dc:date>2016-10-21T13:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT and Masking</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306287#M60988</link>
      <description>&lt;P&gt;If you have control over the macro variable generation then it is not much of an issue.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let group = Dummy='Y';
...
groups="Criteria (&amp;amp;group)";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If don't and the value of &amp;amp;GROUP might have double quotes then you can use QUOTE() function to make sure they are properly doubled up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;groups= %sysfunc(quote(Criteria (&amp;amp;group)));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Oct 2016 14:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306287#M60988</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-10-21T14:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT and Masking</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306290#M60990</link>
      <description>&lt;P&gt;QUOTE function will properly quote DUMMY to produce the correct syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dummy = dummy = "y";
data class;
   length sex $32;
   set sashelp.class;
   run;
proc report data=class;
   columns sex height;
   define sex / group;
   
   compute sex;
      if sex = 'M' then do;
         sex = %sysfunc(quote(Criteria(&amp;amp;dummy)));
         end;
      endcomp;
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG title="Capture.PNG" alt="Capture.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/5411i1AE8B0D7D4566D35/image-size/original?v=v2&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2016 14:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-REPORT-and-Masking/m-p/306290#M60990</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-10-21T14:11:37Z</dc:date>
    </item>
  </channel>
</rss>

