<?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: UNDO_POLICY=NONE update warning - SAS warnings are a Nanny state policy! :&amp;gt; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/UNDO-POLICY-NONE-update-warning-SAS-warnings-are-a-Nanny-state/m-p/283740#M269859</link>
    <description>&lt;P&gt;I can't replicate this warning with below code. How does this look in your environment?&lt;/P&gt;
&lt;P&gt;If the code doesn't throw a warning in your environment as well then can you please try and provide as with some sample code which creates the warning (something we can actually execute and replicate what you describe).&lt;/P&gt;
&lt;P&gt;Also: Which OS and SAS version?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  set sashelp.class;
run;

proc sql UNDO_POLICY=OPTIONAL;
  update have as a
    set sex=(select '?' from sashelp.class as b where a.name=b.name)
  ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I consider warnings in general as a good thing as mostly they indicate that something needs attention. I do agree that there are cases where we should be able to explicitly suppress a warning as we fully understand what's happening.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2016 12:19:04 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2016-07-12T12:19:04Z</dc:date>
    <item>
      <title>UNDO_POLICY=NONE update warning - SAS warnings are a Nanny state policy! :&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/UNDO-POLICY-NONE-update-warning-SAS-warnings-are-a-Nanny-state/m-p/283649#M269858</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I avoid the update warning (see below) which is due to the Nanny state that is SAS&lt;/P&gt;&lt;P&gt;The warning appears in the log when UNDO_POLICY=NONE but&amp;nbsp;with OPTIONAL there is no log message but the program status does not report : successful. I need&amp;nbsp;status = successful&lt;/P&gt;&lt;P&gt;Most sas people I talk to just resign themselves to a non-success&amp;nbsp;output status for an actual valid result&lt;/P&gt;&lt;P&gt;I've investigated the background of the UNDO_POLICY and it is appears more relevent for integrity constraint protection (which is overkill for my program)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %let keepVars = correlationId t_s_date p_effTimestamp t_end_date policyCoverageId txnType&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;coverageAction coverageType brand in_channel occupationCode occupationWages&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pds state termDays;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;DATA ciwork.normprem_input;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;attrib numWrkCmpCoverage length = 3;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;SET ciwork.perilprem_input (in=a keep=&amp;amp;keepVars); /* i&amp;nbsp;can't&lt;BR /&gt;&amp;nbsp;&amp;nbsp;numWrkCmpCoverage = 0;&lt;BR /&gt;&amp;nbsp;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;PROC SQL UNDO_POLICY=OPTIONAL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;UPDATE ciwork.normprem_input AS a&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET numWrkCmpCoverage = COALESCE((SELECT b.numCover&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM (SELECT correlationId, count(correlationId) as numCover&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM ciwork.perilprem_input (WHERE=(coverageType = 'WORKERSCMP'))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;GROUP BY correlationId) AS b&lt;BR /&gt;&amp;nbsp;&amp;nbsp;WHERE a.correlationId = b.correlationId),0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;QUIT;&lt;/P&gt;&lt;P&gt;WARNING: The SQL option UNDO_POLICY=REQUIRED is not in effect. If an error is detected when processing this UPDATE statement, that&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error will not cause the entire statement to fail.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/UNDO-POLICY-NONE-update-warning-SAS-warnings-are-a-Nanny-state/m-p/283649#M269858</guid>
      <dc:creator>pmg7670</dc:creator>
      <dc:date>2016-07-12T01:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: UNDO_POLICY=NONE update warning - SAS warnings are a Nanny state policy! :&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/UNDO-POLICY-NONE-update-warning-SAS-warnings-are-a-Nanny-state/m-p/283740#M269859</link>
      <description>&lt;P&gt;I can't replicate this warning with below code. How does this look in your environment?&lt;/P&gt;
&lt;P&gt;If the code doesn't throw a warning in your environment as well then can you please try and provide as with some sample code which creates the warning (something we can actually execute and replicate what you describe).&lt;/P&gt;
&lt;P&gt;Also: Which OS and SAS version?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  set sashelp.class;
run;

proc sql UNDO_POLICY=OPTIONAL;
  update have as a
    set sex=(select '?' from sashelp.class as b where a.name=b.name)
  ;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I consider warnings in general as a good thing as mostly they indicate that something needs attention. I do agree that there are cases where we should be able to explicitly suppress a warning as we fully understand what's happening.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 12:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/UNDO-POLICY-NONE-update-warning-SAS-warnings-are-a-Nanny-state/m-p/283740#M269859</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-07-12T12:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: UNDO_POLICY=NONE update warning - SAS warnings are a Nanny state policy! :&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/UNDO-POLICY-NONE-update-warning-SAS-warnings-are-a-Nanny-state/m-p/283914#M269860</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Sas package is Foundation&lt;/P&gt;&lt;P&gt;My sas version is : NOTE: SAS (r) Proprietary Software 9.3 (TS1M1)&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Sas platform is : NOTE: This session is executing on the W32_ES08R2&amp;nbsp; platform.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since&amp;nbsp;my&amp;nbsp;code next is similar to my first post, the error mesages appear (see color text)&lt;/P&gt;&lt;P&gt;There is &lt;FONT color="#ff6600"&gt;another warning&lt;/FONT&gt;&amp;nbsp;produced which is due to the source and output dataset being the same (i can easily avoid this one)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; devtmp.help_class;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;attrib&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; count_gender &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;length&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; sashelp.class;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp; count_gender = &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sql&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;UNDO_POLICY&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=OPTIONAL;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;update&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; devtmp.help_class AS a&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; count_gender = (select b.count_gender&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from (select name, count(sex) AS count_gender&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from devtmp.help_class&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by sex) AS b&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&amp;nbsp;where&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; a.name = b.name);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;190 proc sql UNDO_POLICY=OPTIONAL;&lt;/P&gt;&lt;P&gt;191 update devtmp.help_class AS a&lt;/P&gt;&lt;P&gt;192 set count_gender = (select b.count_gender&lt;/P&gt;&lt;P&gt;193 from (select name, count(sex) AS count_gender&lt;/P&gt;&lt;P&gt;194 from devtmp.help_class&lt;/P&gt;&lt;P&gt;195 group by sex) AS b&lt;/P&gt;&lt;P&gt;196 where a.name = b.name);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;WARNING: A value expression of the SET clause references the data set being updated.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366ff"&gt;WARNING: The SQL option UNDO_POLICY=REQUIRED is not in effect. If an error is detected when&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366ff"&gt;processing this UPDATE statement, that error will not cause the entire statement to fail.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;NOTE: 19 rows were updated in DEVTMP.HELP_CLASS.&lt;/P&gt;&lt;P&gt;197 quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 23:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/UNDO-POLICY-NONE-update-warning-SAS-warnings-are-a-Nanny-state/m-p/283914#M269860</guid>
      <dc:creator>pmg7670</dc:creator>
      <dc:date>2016-07-12T23:05:10Z</dc:date>
    </item>
  </channel>
</rss>

