<?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 Compute Block in Proc report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Compute-Block-in-Proc-report/m-p/909447#M358710</link>
    <description>&lt;P&gt;Hi guys... I am trying to use multiple condition in compute block in proc report, however I am unable to produce expected output. Anyone can plz help below is the sample code..&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;proc report data=sashelp.class nowd;&lt;BR /&gt;columns _All_;&lt;BR /&gt;define _All_/ display;&lt;/P&gt;&lt;P&gt;compute Name;&lt;BR /&gt;if Age &amp;gt; 15 and Height &amp;gt;69 then do;&lt;BR /&gt;call define(_row_, 'style', 'style={foreground=Red background=Yellow fontweight=bold}');&lt;BR /&gt;end;&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Dec 2023 10:24:46 GMT</pubDate>
    <dc:creator>SatishR</dc:creator>
    <dc:date>2023-12-22T10:24:46Z</dc:date>
    <item>
      <title>Compute Block in Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-Block-in-Proc-report/m-p/909447#M358710</link>
      <description>&lt;P&gt;Hi guys... I am trying to use multiple condition in compute block in proc report, however I am unable to produce expected output. Anyone can plz help below is the sample code..&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;proc report data=sashelp.class nowd;&lt;BR /&gt;columns _All_;&lt;BR /&gt;define _All_/ display;&lt;/P&gt;&lt;P&gt;compute Name;&lt;BR /&gt;if Age &amp;gt; 15 and Height &amp;gt;69 then do;&lt;BR /&gt;call define(_row_, 'style', 'style={foreground=Red background=Yellow fontweight=bold}');&lt;BR /&gt;end;&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 10:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-Block-in-Proc-report/m-p/909447#M358710</guid>
      <dc:creator>SatishR</dc:creator>
      <dc:date>2023-12-22T10:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Block in Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-Block-in-Proc-report/m-p/909450#M358712</link>
      <description>&lt;P&gt;Use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;compute weight;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;instead of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;compute name;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why? Because in a compute block in PROC REPORT, you can only use variable names that are the variable named in the compute block and variables in the COLUMNS statement to the left of that variable. It cannot use variables named in the COLUMNS statement to the right of that variable. When you use &lt;FONT face="courier new,courier"&gt;compute name;&lt;/FONT&gt; it can use NAME and variables to the left of name in the COLUMNS statement (and there are none); when you use &lt;FONT face="courier new,courier"&gt;compute weight;&lt;/FONT&gt; it can use all the variables because every other variable is to the left of weight.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 10:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-Block-in-Proc-report/m-p/909450#M358712</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-12-22T10:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Block in Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-Block-in-Proc-report/m-p/909460#M358713</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13573"&gt;@Paige&lt;/a&gt; Miller.&lt;BR /&gt;It is working and my concern also resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 11:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-Block-in-Proc-report/m-p/909460#M358713</guid>
      <dc:creator>SatishR</dc:creator>
      <dc:date>2023-12-22T11:17:01Z</dc:date>
    </item>
  </channel>
</rss>

