<?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 append to DB2 - No error when loading duplicates eventhough we have constraints in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610820#M18157</link>
    <description>&lt;P&gt;Thanks Patrick. Really helpful. Is there any way we can avoid this behavior, i need to use CLILoad for sure as the table is huge and taking longer time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any other way using CLILoad but we can capture the ERROR in SAS by throwing an error like unique constraint violated. This will make us easy in case of production support without any error we may think that job is success, but actually job is supposed to fail by unique constraint.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2019 20:05:39 GMT</pubDate>
    <dc:creator>AravindPalanichamy</dc:creator>
    <dc:date>2019-12-10T20:05:39Z</dc:date>
    <item>
      <title>Proc append to DB2 - No error when loading duplicates eventhough we have constraints</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610557#M18117</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wondering someone would help explaining me that Y proc append doesnt throw an error when loading in to DB2 table where they have constraints. I tried to append a existing row in to DB2 table, it doesnt throw me unique constraint error rather it is throwing 1 rows loaded and 1 rows deleted, due to this my job doesnt get exit.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc append base = libref.tablename( BULKLOAD = YES &lt;BR /&gt;BL_METHOD=CLILOAD ) &lt;BR /&gt;data = sastable force ; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;1 rows loaded.&lt;BR /&gt;0 rows skipped.&lt;BR /&gt;0 rows rejected.&lt;BR /&gt;1 rows deleted as duplicates.&lt;BR /&gt;1 rows committed.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 09 Dec 2019 21:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610557#M18117</guid>
      <dc:creator>AravindPalanichamy</dc:creator>
      <dc:date>2019-12-09T21:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc append to DB2 - No error when loading duplicates eventhough we have constraints</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610577#M18119</link>
      <description>&lt;P&gt;Looks like this is not a SAS but DB2 behaviour when using the CLI LOAD utility.&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;The insertion of data is non-atomic because the load utility precludes atomicity.&amp;nbsp;&lt;SPAN class="keyword cmdname"&gt;LOAD&lt;/SPAN&gt;&amp;nbsp;might not be able to successfully insert all the rows passed to it. For example, &lt;STRONG&gt;if a unique key constraint is violated by a row being inserted,&amp;nbsp;&lt;SPAN class="keyword cmdname"&gt;LOAD&lt;/SPAN&gt;&amp;nbsp;will not insert this row but will continue loading the remaining rows&lt;/STRONG&gt;.&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.apdv.cli.doc/doc/t0007871.html" target="_blank" rel="noopener"&gt;https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.apdv.cli.doc/doc/t0007871.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 22:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610577#M18119</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-12-09T22:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc append to DB2 - No error when loading duplicates eventhough we have constraints</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610820#M18157</link>
      <description>&lt;P&gt;Thanks Patrick. Really helpful. Is there any way we can avoid this behavior, i need to use CLILoad for sure as the table is huge and taking longer time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any other way using CLILoad but we can capture the ERROR in SAS by throwing an error like unique constraint violated. This will make us easy in case of production support without any error we may think that job is success, but actually job is supposed to fail by unique constraint.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 20:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610820#M18157</guid>
      <dc:creator>AravindPalanichamy</dc:creator>
      <dc:date>2019-12-10T20:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc append to DB2 - No error when loading duplicates eventhough we have constraints</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610847#M18158</link>
      <description>&lt;P&gt;It looks to me like SAS is doing nothing else than reporting what DB2 tells it that happens.&lt;/P&gt;
&lt;P&gt;I don't know if there is a way to change the CLI Load Utility behaviour. It's a question you need to ask a DB2 DBA.&lt;/P&gt;
&lt;P&gt;You could use the CLI Load Utility to first load the data into a DB2 staging table and then use a "normal" insert to load the staging table into your target table (DB2 to DB2).&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 21:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-append-to-DB2-No-error-when-loading-duplicates-eventhough/m-p/610847#M18158</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-12-10T21:48:02Z</dc:date>
    </item>
  </channel>
</rss>

