<?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 How to stop printing Proc univariate output(NOPRINT doesnt work) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-printing-Proc-univariate-output-NOPRINT-doesnt-work/m-p/505713#M135463</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;I am trying to run a simulation for the normality test. I have the following program which is running well. But I have a problem with output. It is always printing output tables of "proc univariate." When I use "NOPRINT" I received&amp;nbsp;the same answer and warning "&lt;/P&gt;
&lt;DIV class="sasWarning"&gt;&lt;STRONG&gt;verify that the appropriate procedure options are used to produce the requested output object. For example, verify&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&lt;STRONG&gt;that the NOPRINT option is not used.&lt;/STRONG&gt;" Without NOPRINT, It prints the proc univariate output so program stuck in the middle of the simulation. "I greatly&amp;nbsp;appreciate&amp;nbsp;any suggestions.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let N=10;
%let outlierPct=5;
%let NumSamples = 100;

data simulation(keep=sim y); 
do sim=1 to &amp;amp;NumSamples; /* 1. create many samples */

call streaminit(12345);
outlierNb = round(&amp;amp;N.*&amp;amp;outlierPct./100);
do i = 1 to outlierNb; 
y = rand("Normal",0,4);
output;
end;
do i = outlierNb+1 to &amp;amp;N.; 
y = rand("Normal",0,1);
output;
end;
end;
run;

*ods listing close;
*ods select html close;
ods select TestsforNormality;
proc univariate data=simulation normaltest noprint ;
by sim;
var y;
ods output TestsforNormality=normaltest;
run;
*ods listing;
*ods html;


*create 0/1 variable for rejection of hyphotesis;
data normaltest;

set normaltest;

reject=(pValue&amp;lt;0.1);

run;

*calculate the chance of rejection;

proc means data=normaltest mean;

var reject;

class Test;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 18 Oct 2018 19:15:15 GMT</pubDate>
    <dc:creator>kamal1</dc:creator>
    <dc:date>2018-10-18T19:15:15Z</dc:date>
    <item>
      <title>How to stop printing Proc univariate output(NOPRINT doesnt work)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-printing-Proc-univariate-output-NOPRINT-doesnt-work/m-p/505713#M135463</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;I am trying to run a simulation for the normality test. I have the following program which is running well. But I have a problem with output. It is always printing output tables of "proc univariate." When I use "NOPRINT" I received&amp;nbsp;the same answer and warning "&lt;/P&gt;
&lt;DIV class="sasWarning"&gt;&lt;STRONG&gt;verify that the appropriate procedure options are used to produce the requested output object. For example, verify&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&lt;STRONG&gt;that the NOPRINT option is not used.&lt;/STRONG&gt;" Without NOPRINT, It prints the proc univariate output so program stuck in the middle of the simulation. "I greatly&amp;nbsp;appreciate&amp;nbsp;any suggestions.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let N=10;
%let outlierPct=5;
%let NumSamples = 100;

data simulation(keep=sim y); 
do sim=1 to &amp;amp;NumSamples; /* 1. create many samples */

call streaminit(12345);
outlierNb = round(&amp;amp;N.*&amp;amp;outlierPct./100);
do i = 1 to outlierNb; 
y = rand("Normal",0,4);
output;
end;
do i = outlierNb+1 to &amp;amp;N.; 
y = rand("Normal",0,1);
output;
end;
end;
run;

*ods listing close;
*ods select html close;
ods select TestsforNormality;
proc univariate data=simulation normaltest noprint ;
by sim;
var y;
ods output TestsforNormality=normaltest;
run;
*ods listing;
*ods html;


*create 0/1 variable for rejection of hyphotesis;
data normaltest;

set normaltest;

reject=(pValue&amp;lt;0.1);

run;

*calculate the chance of rejection;

proc means data=normaltest mean;

var reject;

class Test;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Oct 2018 19:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-printing-Proc-univariate-output-NOPRINT-doesnt-work/m-p/505713#M135463</guid>
      <dc:creator>kamal1</dc:creator>
      <dc:date>2018-10-18T19:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop printing Proc univariate output(NOPRINT doesnt work)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-printing-Proc-univariate-output-NOPRINT-doesnt-work/m-p/505715#M135465</link>
      <description>&lt;P&gt;Change to this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select None;
proc univariate data=simulation normaltest;
by sim;
var y;
ods output TestsforNormality=normaltest;
run;
ods select all;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;1. Remove noprint&lt;/P&gt;
&lt;P&gt;2. add ODS SELECT NONE/ALL&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do the same thing to PROC MEANS if necessary.&lt;/P&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/60373"&gt;@kamal1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;I am trying to run a simulation for the normality test. I have the following program which is running well. But I have a problem with output. It is always printing output tables of "proc univariate." When I use "NOPRINT" I received&amp;nbsp;the same answer and warning "&lt;/P&gt;
&lt;DIV class="sasWarning"&gt;&lt;STRONG&gt;verify that the appropriate procedure options are used to produce the requested output object. For example, verify&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&lt;STRONG&gt;that the NOPRINT option is not used.&lt;/STRONG&gt;" Without NOPRINT, It prints the proc univariate output so program stuck in the middle of the simulation. "I greatly&amp;nbsp;appreciate&amp;nbsp;any suggestions.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let N=10;
%let outlierPct=5;
%let NumSamples = 100;

data simulation(keep=sim y); 
do sim=1 to &amp;amp;NumSamples; /* 1. create many samples */

call streaminit(12345);
outlierNb = round(&amp;amp;N.*&amp;amp;outlierPct./100);
do i = 1 to outlierNb; 
y = rand("Normal",0,4);
output;
end;
do i = outlierNb+1 to &amp;amp;N.; 
y = rand("Normal",0,1);
output;
end;
end;
run;

*ods listing close;
*ods select html close;
ods select TestsforNormality;
proc univariate data=simulation normaltest noprint ;
by sim;
var y;
ods output TestsforNormality=normaltest;
run;
*ods listing;
*ods html;


*create 0/1 variable for rejection of hyphotesis;
data normaltest;

set normaltest;

reject=(pValue&amp;lt;0.1);

run;

*calculate the chance of rejection;

proc means data=normaltest mean;

var reject;

class Test;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 19:22:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-printing-Proc-univariate-output-NOPRINT-doesnt-work/m-p/505715#M135465</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-18T19:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop printing Proc univariate output(NOPRINT doesnt work)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-stop-printing-Proc-univariate-output-NOPRINT-doesnt-work/m-p/505721#M135467</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;You are AWESOME!! Thank you so much replying my post in less than&amp;nbsp;3 min. It is perfect. You saved my time. If you know any article where I should look at for proc mean procedure, please let me know.&lt;/P&gt;
&lt;P&gt;Thank you very much again.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 19:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-stop-printing-Proc-univariate-output-NOPRINT-doesnt-work/m-p/505721#M135467</guid>
      <dc:creator>kamal1</dc:creator>
      <dc:date>2018-10-18T19:31:40Z</dc:date>
    </item>
  </channel>
</rss>

