<?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 Pass-Through automatic variable does not work in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82746#M17855</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to execute a sql Pass-Through versus an Oracle db.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same sql Pass-Through I execute 3 different execute, 2 create table and a final merge. The last merge generate the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: ORACLE execute error: ORA-01400: cannot insert NULL into ("blablabla").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the sql Pass-Through, if I try to put the following automatic variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put ORACLE EXIT CODE: &amp;amp;SQLXRC;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put ORACLE MESSAGE CODE: %superq(sqlxmsg);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get &lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;respectively &lt;/SPAN&gt;&lt;/SPAN&gt;0 and empty string, and no message has returned to me unlike what &lt;SPAN class="hps"&gt;mentioned&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in SAS documentation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/viewer.htm#a001360755.htm"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/viewer.htm#a001360755.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Could someone help me to understand what is wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Many thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2013 15:46:26 GMT</pubDate>
    <dc:creator>garag</dc:creator>
    <dc:date>2013-05-22T15:46:26Z</dc:date>
    <item>
      <title>Pass-Through automatic variable does not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82746#M17855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to execute a sql Pass-Through versus an Oracle db.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same sql Pass-Through I execute 3 different execute, 2 create table and a final merge. The last merge generate the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: ORACLE execute error: ORA-01400: cannot insert NULL into ("blablabla").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the sql Pass-Through, if I try to put the following automatic variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put ORACLE EXIT CODE: &amp;amp;SQLXRC;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put ORACLE MESSAGE CODE: %superq(sqlxmsg);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get &lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;respectively &lt;/SPAN&gt;&lt;/SPAN&gt;0 and empty string, and no message has returned to me unlike what &lt;SPAN class="hps"&gt;mentioned&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in SAS documentation&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/viewer.htm#a001360755.htm"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/viewer.htm#a001360755.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Could someone help me to understand what is wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;Many thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 15:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82746#M17855</guid>
      <dc:creator>garag</dc:creator>
      <dc:date>2013-05-22T15:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Pass-Through automatic variable does not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82747#M17856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to your actual oracle code and run your exact pass thorugh. If you do, do you get the following error? It almost sounds like you created a table with a key on it, and then are trying to insert a null value into the key (which you cannot do).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I cannot judge without seeing your entire full code!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 15:53:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82747#M17856</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2013-05-22T15:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Pass-Through automatic variable does not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82748#M17857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try to run the same come in Oracle sql window I get the same error, it 's clear, the pass-through works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question was about the automatic variables SQLXRC and sqlxmsg that, according to SAS documentation, should contains the Oracle error and Oracle error message.&lt;/P&gt;&lt;P&gt;Instead, after an Oracle pass-through completed with error, if I execute &lt;/P&gt;&lt;P&gt;%put ORACLE EXIT CODE: &amp;amp;SQLXRC;&amp;nbsp; &lt;/P&gt;&lt;P&gt;%put ORACLE MESSAGE CODE: %superq(sqlxmsg);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get&lt;/P&gt;&lt;P&gt;ORACLE EXIT CODDE: 0&lt;/P&gt;&lt;P&gt;ORACLE MESSAGE CODE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insted in the log some rows above there was written:&lt;/P&gt;&lt;P&gt;ERROR: ORACLE execute error: ORA-01400: cannot insert NULL into ("blablabla").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expected that, after the failed pass-troguh, running the following code:&lt;/P&gt;&lt;P&gt;%put ORACLE EXIT CODE: &amp;amp;SQLXRC;&amp;nbsp; &lt;/P&gt;&lt;P&gt;%put ORACLE MESSAGE CODE: %superq(sqlxmsg);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get:&lt;/P&gt;&lt;P&gt;ORACLE EXIT CODE:ORA-01400&lt;/P&gt;&lt;P&gt;ORACLE MESSAGE CODE: cannot insert NULL into ("blablabla").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or something like this. I repeat, the problem it seems on automatic variables&lt;/P&gt;&lt;P&gt;I hope it's clear now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 16:28:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82748#M17857</guid>
      <dc:creator>garag</dc:creator>
      <dc:date>2013-05-22T16:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Pass-Through automatic variable does not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82749#M17858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you executing the %puts after all your pass-thru statements have finished, or after each one? You mentioned your pass-thru job has multiple steps. Unless I'm mistaken, SQLXRC and SQLXMSG are reset to 0 and blank prior to the execution of any pass-thru command. So if it's an intermediate step that's generating the error (for example, one of your create table statements) AND you follow that with another statement, the second statement will clear out the messages from the first statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a guess, of course, without actually looking at your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Karl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 14:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pass-Through-automatic-variable-does-not-work/m-p/82749#M17858</guid>
      <dc:creator>KarlK</dc:creator>
      <dc:date>2013-05-23T14:39:14Z</dc:date>
    </item>
  </channel>
</rss>

