<?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: ODS Output NOWARN in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/583343#M23205</link>
    <description>I had a similar problem with the NOWARN option. After several guesses at the correct syntax, the following worked: ODS OUTPUT TABLE (NOWARN) = LIB.DATASET;</description>
    <pubDate>Thu, 22 Aug 2019 22:05:45 GMT</pubDate>
    <dc:creator>kmanderson</dc:creator>
    <dc:date>2019-08-22T22:05:45Z</dc:date>
    <item>
      <title>ODS Output NOWARN</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/302362#M17073</link>
      <description>&lt;P&gt;The ODS OUTPUT statement documentation includes NOWARN.&amp;nbsp; I am scan a large directory and abstracting the metadata of the data sets using the CONTENTS procedure.&amp;nbsp; Although a SAS data set exists in some directories, it may not have variables or observations.&amp;nbsp; This occurs through a programming practice I would prohibit in my shop:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; stop ;&lt;/P&gt;
&lt;P&gt;run ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I avoid the output variables not created warning?&amp;nbsp; I have tried variations on:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods output variables = variables ( nowarn ) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 15:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/302362#M17073</guid>
      <dc:creator>KevinViel</dc:creator>
      <dc:date>2016-10-04T15:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Output NOWARN</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/302367#M17074</link>
      <description>&lt;P&gt;Sometimes you'll see a hybrid like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; stop;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That gives you a data set with 0 observations, but with all variables defined.&amp;nbsp; Is it OK to omit the PROC CONTENTS for those too?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 15:18:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/302367#M17074</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-10-04T15:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Output NOWARN</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/302416#M17082</link>
      <description>&lt;P&gt;Astounding,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Correct, as does my preferred flavor:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if 0 then set have ;&lt;/P&gt;
&lt;P&gt;run ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(I use this, for instance, when obtaining the attributes for a hash, with a data set KEEP= option as appropriate.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both of these approaches create variables, assuming that have has variables.&amp;nbsp; CONTENTS did not "like" the absence of variables, but it reported the metadata with 0 observations.&amp;nbsp; I cannot control what "data sets" are in the directories.&amp;nbsp; I even found some files with a .sas7bdat extension that SAS did not recognize and reported something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DM.AE.DATA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FWIW, %sysfunc( exist( DM.AE ))&amp;nbsp; was equal to 1 in that case.&amp;nbsp; I am not that interested in a "clean" log; I will just acknowledge a priori in the production run that these warnings are acceptable (for this purpose).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 17:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/302416#M17082</guid>
      <dc:creator>KevinViel</dc:creator>
      <dc:date>2016-10-04T17:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Output NOWARN</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/302418#M17083</link>
      <description>&lt;P&gt;Given your answer, I'm not sure if this will be useful or not.&amp;nbsp; But here's a way to skip PROC CONTENTS when there are 0 observations (regardless of the number of variables).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;set &amp;amp;whatever;&lt;/P&gt;
&lt;P&gt;call execute ("proc contents data=&amp;amp;whatever; run;");&lt;/P&gt;
&lt;P&gt;stop;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Also note, if this is your idea of fun, you can create a data set with multiple observations and zero variables:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;/P&gt;
&lt;P&gt;do i=1 to 10;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;drop i;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 18:00:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/302418#M17083</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-10-04T18:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Output NOWARN</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/583343#M23205</link>
      <description>I had a similar problem with the NOWARN option. After several guesses at the correct syntax, the following worked: ODS OUTPUT TABLE (NOWARN) = LIB.DATASET;</description>
      <pubDate>Thu, 22 Aug 2019 22:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Output-NOWARN/m-p/583343#M23205</guid>
      <dc:creator>kmanderson</dc:creator>
      <dc:date>2019-08-22T22:05:45Z</dc:date>
    </item>
  </channel>
</rss>

