<?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: Unique index constraint violation: Error instead of Warning in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unique-index-constraint-violation-Error-instead-of-Warning/m-p/845553#M334286</link>
    <description>&lt;P&gt;I browsed The Complete Guide to SAS Indexes by Michael A. Raithel and did not find such an option either.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Nov 2022 20:17:58 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2022-11-21T20:17:58Z</dc:date>
    <item>
      <title>Unique index constraint violation: Error instead of Warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unique-index-constraint-violation-Error-instead-of-Warning/m-p/844793#M333979</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Is there any SAS option I could change so that a unique index constraint violation leads to an Error instead of a Warning?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data target(index=(name /unique)) Change;
  set sashelp.class;
  output target;
  if _n_=5 then name='Neo' ;
  output Change; 
run;

proc append base=target data=change;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1668684393281.png" style="width: 667px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77385iBBF5B40CF28ADEAE/image-dimensions/667x80?v=v2" width="667" height="80" role="button" title="Patrick_0-1668684393281.png" alt="Patrick_0-1668684393281.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In an ideal world SAS would roll-back the insert - but I can understand that I'm not dealing with a database and why that's not possible and it's also not a real issue for my actual use case.&lt;/P&gt;
&lt;P&gt;....but I'd really love if SAS would throw an Error and stop further processing instead of me having to check explicitly for a Warning and then issue an abort.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 11:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unique-index-constraint-violation-Error-instead-of-Warning/m-p/844793#M333979</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-11-17T11:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unique index constraint violation: Error instead of Warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unique-index-constraint-violation-Error-instead-of-Warning/m-p/845281#M334165</link>
      <description>&lt;P&gt;Given that no one answered assumed that I didn't miss something and there isn't a SAS option/configuration that would allow me to instruct SAS to throw an error instead of a warning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Going to mark my own answer as solution in order to close this track.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2022 22:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unique-index-constraint-violation-Error-instead-of-Warning/m-p/845281#M334165</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-11-19T22:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unique index constraint violation: Error instead of Warning</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unique-index-constraint-violation-Error-instead-of-Warning/m-p/845553#M334286</link>
      <description>&lt;P&gt;I browsed The Complete Guide to SAS Indexes by Michael A. Raithel and did not find such an option either.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 20:17:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unique-index-constraint-violation-Error-instead-of-Warning/m-p/845553#M334286</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-11-21T20:17:58Z</dc:date>
    </item>
  </channel>
</rss>

