<?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 Noprint Variable in COMPUTE Block in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884379#M349389</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74"&gt;@djbateman&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Also, that was the entire log. I left nothing out. Just 3 simple notes.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74"&gt;@djbateman&lt;/a&gt;&amp;nbsp;I disagree. The entire log shows code, beginning with the PROC REPORT statement and it continues down until the last NOTE after the end of the procedure. That's what we need from now on, the ENTIRE log for the PROC (or data step) including code, with nothing chopped out. Separating the ERROR messages from the code that created it is counter-productive, and doesn't let us clearly understand the errors in most cases (and although it does not matter in this specific example, it does matter and is critical in many other situations).&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jul 2023 18:22:56 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-07-11T18:22:56Z</dc:date>
    <item>
      <title>PROC REPORT Noprint Variable in COMPUTE Block</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884350#M349369</link>
      <description>&lt;P&gt;I am not new to PROC REPORT, but I cannot seem to get this to work for some reason.&amp;nbsp; Can someone help me see where I am missing something?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code below is extrememly simplified from what I have in practice (I actually have 35+ variables between SUBJID and STATUS).&amp;nbsp; But in short, I only want to highlight these 2 variables if an additional variable (NEW) is flagged even though I do not want NEW to appear in the output.&amp;nbsp; I know that a compute block will only look at variables to the left, so I put NEW at the very end to ensure that all variables are previously defined.&amp;nbsp; Still, when I run this code, I get a note in the log that NEW is uninitialized, and no highlighting occurrs.&amp;nbsp; Can someone tell me if I am doing something wrong?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table final (SUBJID char(11), STATUS char(15), new num);
		insert into final (subjid, status, new)
			values ('101-136-001','Screen Failed',.)
			values ('101-136-002','Screen Failed',1)
			values ('101-136-003','Screened',.)
			values ('101-136-004','Randomized',.)
			values ('101-136-005','Genotyped',1)
			values ('101-136-006','Screened',.);
quit;

proc report data=final;
	column SUBJID STATUS NEW;
	define subjid /	'Subject Number';
	define status / 'Status';
	define new / noprint;
	compute new;
		if new=1 then do;
			call define('subjid',"style","style={background=cx00B0F0}");
			call define('status',"style","style={background=cx00B0F0}");
		end;
	endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS LOG:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;5743  proc sql;
5744      create table final (SUBJID char(11), STATUS char(15), new num);
NOTE: Table WORK.FINAL created, with 0 rows and 3 columns.
5745          insert into final (subjid, status, new)
5746              values ('101-136-001','Screen Failed',.)
5747              values ('101-136-002','Screen Failed',1)
5748              values ('101-136-003','Screened',.)
5749              values ('101-136-004','Randomized',.)
5750              values ('101-136-005','Genotyped',1)
5751              values ('101-136-006','Screened',.);
NOTE: 6 rows were inserted into WORK.FINAL.

5752  quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds


5753
5754  proc report data=final;
5755      column SUBJID STATUS NEW;
5756      define subjid / 'Subject Number';
5757      define status / 'Status';
5758      define new / noprint;
5759      compute new;
5760          if new=1 then do;
5761              call define('subjid',"style","style={background=cx00B0F0}");
5762              call define('status',"style","style={background=cx00B0F0}");
5763          end;
5764      endcomp;
5765  run;

NOTE: Variable new is uninitialized.
NOTE: There were 6 observations read from the data set WORK.FINAL.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jul 2023 18:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884350#M349369</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2023-07-11T18:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT Noprint Variable in COMPUTE Block</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884353#M349371</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;define new / display noprint;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, from now on, please show us the ENTIRE log for the PROC (or data step) that has the error. Do not pick and choose parts of the log of that PROC (or data step) to show us. Do not separate the errors from the code (as seen in the log) that produced them.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 15:23:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884353#M349371</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-07-11T15:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT Noprint Variable in COMPUTE Block</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884354#M349372</link>
      <description>ARE YOU SERIOUS?  That did the trick.  I knew it would be something simple that I was just not seeing.  Thank you so much!</description>
      <pubDate>Tue, 11 Jul 2023 15:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884354#M349372</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2023-07-11T15:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT Noprint Variable in COMPUTE Block</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884356#M349374</link>
      <description>Also, that was the entire log.  I left nothing out.  Just 3 simple notes.</description>
      <pubDate>Tue, 11 Jul 2023 15:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884356#M349374</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2023-07-11T15:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT Noprint Variable in COMPUTE Block</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884362#M349378</link>
      <description>&lt;P&gt;The default type for numeric variables is ANALYSIS.&amp;nbsp; You could have used NEW.SUM in the COMPUTE block.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 16:30:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884362#M349378</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2023-07-11T16:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT Noprint Variable in COMPUTE Block</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884379#M349389</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74"&gt;@djbateman&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Also, that was the entire log. I left nothing out. Just 3 simple notes.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74"&gt;@djbateman&lt;/a&gt;&amp;nbsp;I disagree. The entire log shows code, beginning with the PROC REPORT statement and it continues down until the last NOTE after the end of the procedure. That's what we need from now on, the ENTIRE log for the PROC (or data step) including code, with nothing chopped out. Separating the ERROR messages from the code that created it is counter-productive, and doesn't let us clearly understand the errors in most cases (and although it does not matter in this specific example, it does matter and is critical in many other situations).&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 18:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Noprint-Variable-in-COMPUTE-Block/m-p/884379#M349389</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-07-11T18:22:56Z</dc:date>
    </item>
  </channel>
</rss>

