<?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: NO Print option in sas EG in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574265#M12668</link>
    <description>&lt;P&gt;1. Get the number of observations in the data set.&lt;/P&gt;
&lt;P&gt;2. Decide to print or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
create table xyz as
select * from sashelp.class;
quit;

*gets count;
%let count = &amp;amp;sqlobs;

data _null_;
if &amp;amp;count &amp;lt;= 1000 then do;
      call execute('proc print data=xyz; run;');
end;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are various ways to get the count and various ways to conditionally run things, I've illustrated one above. I'm assuming your code is not realistic and simplified for the forum so just giving the generic solution.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2019 16:28:46 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-07-17T16:28:46Z</dc:date>
    <item>
      <title>NO Print option in sas EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574182#M12651</link>
      <description>&lt;P&gt;Hi All, I want to use no print option when data size is large .Please help me on the below.&lt;/P&gt;&lt;P&gt;Below is my sample code, if my data output exceeds 1000 observation then it should not print the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data xyz;&lt;BR /&gt;set sashelp.class;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=xyz;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc report data=xyz (option=noprint);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;BR /&gt;select * from sashelp.class;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 14:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574182#M12651</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-07-17T14:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: NO Print option in sas EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574207#M12654</link>
      <description>&lt;P&gt;I don't understand the request.&lt;/P&gt;
&lt;P&gt;Do you want to only print a few observations to provide an example?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=xyz(obs=10);
title2 'First 10 observations';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Jul 2019 15:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574207#M12654</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-17T15:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: NO Print option in sas EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574211#M12655</link>
      <description>&lt;P&gt;Thanks for answer Tom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 15:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574211#M12655</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-07-17T15:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: NO Print option in sas EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574212#M12656</link>
      <description>Not sure what you mean. You want to conditionally execute the PROC PRINT or REPORT?&lt;BR /&gt;&lt;BR /&gt;Do you want to limit the observations or not have any output. &lt;BR /&gt;&lt;BR /&gt;You can add the data set option OBS=1000 to the data sets to have it only print 1000 max.&lt;BR /&gt;&lt;BR /&gt;proc print data=xyz (obs=1000);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Jul 2019 15:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574212#M12656</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-17T15:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: NO Print option in sas EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574264#M12667</link>
      <description>&lt;P&gt;Thanks for the replay Reeza.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if My data exceeds 1000 then it shout not print otherwise it should print .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;your code is working fine.Thanks for the answer&amp;nbsp;Reeza&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 16:21:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574264#M12667</guid>
      <dc:creator>sivastat08</dc:creator>
      <dc:date>2019-07-17T16:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: NO Print option in sas EG</title>
      <link>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574265#M12668</link>
      <description>&lt;P&gt;1. Get the number of observations in the data set.&lt;/P&gt;
&lt;P&gt;2. Decide to print or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
create table xyz as
select * from sashelp.class;
quit;

*gets count;
%let count = &amp;amp;sqlobs;

data _null_;
if &amp;amp;count &amp;lt;= 1000 then do;
      call execute('proc print data=xyz; run;');
end;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are various ways to get the count and various ways to conditionally run things, I've illustrated one above. I'm assuming your code is not realistic and simplified for the forum so just giving the generic solution.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 16:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/NO-Print-option-in-sas-EG/m-p/574265#M12668</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-17T16:28:46Z</dc:date>
    </item>
  </channel>
</rss>

