<?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 sql noprint - affects all proc sql's in program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558363#M155838</link>
    <description>&lt;P&gt;Are you ending your queries with a QUIT or RUN? If not, try ending each query with a quit first.&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/272348"&gt;@jamesBFD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I've got a short program that has two proc sql statements in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first one will return a small 1 column dataset. I've then got a macro that looks at the number of observations returned by the proc sql. It will do different things depending on if there is more than 1 observation returned. Returning just one observation will cause a Data statement to run and show an output I want. If more than 1 observation is returned then I'm running another proc sql statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't want to display the results of the first proc sql but I do want to display the results of the second.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if I add a noprint option to the first proc sql then my program doesn't show either result. That isn't the behaviour I was expecting from noprint so I'm a bit confused.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't share any of my code on here unfortunately, so I've tried to explain it as fully as I could.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help please?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2019 16:27:45 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-05-13T16:27:45Z</dc:date>
    <item>
      <title>proc sql noprint - affects all proc sql's in program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558350#M155829</link>
      <description>&lt;P&gt;I've got a short program that has two proc sql statements in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first one will return a small 1 column dataset. I've then got a macro that looks at the number of observations returned by the proc sql. It will do different things depending on if there is more than 1 observation returned. Returning just one observation will cause a Data statement to run and show an output I want. If more than 1 observation is returned then I'm running another proc sql statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't want to display the results of the first proc sql but I do want to display the results of the second.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However if I add a noprint option to the first proc sql then my program doesn't show either result. That isn't the behaviour I was expecting from noprint so I'm a bit confused.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't share any of my code on here unfortunately, so I've tried to explain it as fully as I could.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help please?&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 15:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558350#M155829</guid>
      <dc:creator>jamesBFD</dc:creator>
      <dc:date>2019-05-13T15:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql noprint - affects all proc sql's in program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558352#M155831</link>
      <description>&lt;P&gt;Show your code. Change anything that might be sensitive such as file path and name, variables, libraries or data set names to "generic" such as "c:\path\file.txt", var1, var2, LIB1, data1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you have a "macro" involved locations of specific coding elements become very important since that generates code and you may have something buried in the macro that is setting options you forget.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 16:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558352#M155831</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-13T16:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql noprint - affects all proc sql's in program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558363#M155838</link>
      <description>&lt;P&gt;Are you ending your queries with a QUIT or RUN? If not, try ending each query with a quit first.&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/272348"&gt;@jamesBFD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I've got a short program that has two proc sql statements in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first one will return a small 1 column dataset. I've then got a macro that looks at the number of observations returned by the proc sql. It will do different things depending on if there is more than 1 observation returned. Returning just one observation will cause a Data statement to run and show an output I want. If more than 1 observation is returned then I'm running another proc sql statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't want to display the results of the first proc sql but I do want to display the results of the second.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if I add a noprint option to the first proc sql then my program doesn't show either result. That isn't the behaviour I was expecting from noprint so I'm a bit confused.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't share any of my code on here unfortunately, so I've tried to explain it as fully as I could.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help please?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 16:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558363#M155838</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-13T16:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql noprint - affects all proc sql's in program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558397#M155852</link>
      <description>&lt;P&gt;You can turn the NOPRINT (and other options) on/off in the same PROC SQL step using the RESET statement.&lt;/P&gt;
&lt;P&gt;For example this code will print only one list to the output.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
select name into :name_list separated by ' ' from sashelp.class where sex='M';
reset print;
select name into :name_list separated by ' ' from sashelp.class where sex='M';
reset noprint;
select name into :name_list separated by ' ' from sashelp.class where sex='M';
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 17:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558397#M155852</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-13T17:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql noprint - affects all proc sql's in program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558564#M155901</link>
      <description>Thanks, the reset print statement worked perfectly.</description>
      <pubDate>Tue, 14 May 2019 08:52:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-noprint-affects-all-proc-sql-s-in-program/m-p/558564#M155901</guid>
      <dc:creator>jamesBFD</dc:creator>
      <dc:date>2019-05-14T08:52:15Z</dc:date>
    </item>
  </channel>
</rss>

