<?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: dbconinit calling dabase procedure 2 times for for one execution in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/dbconinit-calling-dabase-procedure-2-times-for-for-one-execution/m-p/453420#M114577</link>
    <description>&lt;P&gt;Embedding a LIBNAME statement inside PROC SQL makes no sense. Move it to open code. Also not sure why you need both a libname DB connection and also an SQL passthru DB connection. What does your complete code look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro exsetup
%put &amp;amp;sysuserid;

libname l123 oracle user=&amp;lt;&amp;lt;username&amp;gt;&amp;gt; password=&amp;lt;&amp;lt;password&amp;gt;&amp;gt; path=&amp;lt;&amp;lt;service&amp;gt;&amp;gt;
dbconinit = "begin pkg.procedure_name(1234); end;";

proc sql;
connect to oracle(path=&amp;lt;&amp;lt;service&amp;gt;&amp;gt; user=&amp;lt;&amp;lt;username&amp;gt;&amp;gt; password=&amp;lt;&amp;lt;password&amp;gt;&amp;gt;);
quit;
%mend exsetup;
%exsetup;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Apr 2018 01:18:59 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-04-12T01:18:59Z</dc:date>
    <item>
      <title>dbconinit calling dabase procedure 2 times for for one execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dbconinit-calling-dabase-procedure-2-times-for-for-one-execution/m-p/453375#M114554</link>
      <description>&lt;P&gt;I am using the below code to call a DB procedure from Sas. Sas is calling the procedure 2 times for one execution. Please help why it is calling the procedure 2 times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro exsetup&lt;/P&gt;&lt;P&gt;%put &amp;amp;sysuserid;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;connect to oracle(path=&amp;lt;&amp;lt;service&amp;gt;&amp;gt; user=&amp;lt;&amp;lt;username&amp;gt;&amp;gt; password=&amp;lt;&amp;lt;password&amp;gt;&amp;gt;);&lt;/P&gt;&lt;P&gt;libname l123 oracle user=&amp;lt;&amp;lt;username&amp;gt;&amp;gt; password=&amp;lt;&amp;lt;password&amp;gt;&amp;gt; path=&amp;lt;&amp;lt;service&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;dbconinit = "begin pkg.procedure_name(1234); end;";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;%mend exsetup;&lt;/P&gt;&lt;P&gt;%exsetup;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 21:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dbconinit-calling-dabase-procedure-2-times-for-for-one-execution/m-p/453375#M114554</guid>
      <dc:creator>ajaybetham</dc:creator>
      <dc:date>2018-04-11T21:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: dbconinit calling dabase procedure 2 times for for one execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dbconinit-calling-dabase-procedure-2-times-for-for-one-execution/m-p/453420#M114577</link>
      <description>&lt;P&gt;Embedding a LIBNAME statement inside PROC SQL makes no sense. Move it to open code. Also not sure why you need both a libname DB connection and also an SQL passthru DB connection. What does your complete code look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro exsetup
%put &amp;amp;sysuserid;

libname l123 oracle user=&amp;lt;&amp;lt;username&amp;gt;&amp;gt; password=&amp;lt;&amp;lt;password&amp;gt;&amp;gt; path=&amp;lt;&amp;lt;service&amp;gt;&amp;gt;
dbconinit = "begin pkg.procedure_name(1234); end;";

proc sql;
connect to oracle(path=&amp;lt;&amp;lt;service&amp;gt;&amp;gt; user=&amp;lt;&amp;lt;username&amp;gt;&amp;gt; password=&amp;lt;&amp;lt;password&amp;gt;&amp;gt;);
quit;
%mend exsetup;
%exsetup;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 01:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dbconinit-calling-dabase-procedure-2-times-for-for-one-execution/m-p/453420#M114577</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-04-12T01:18:59Z</dc:date>
    </item>
  </channel>
</rss>

