<?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 SQL connect to ODBC in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226713#M54088</link>
    <description>&lt;P&gt;Your %included file already contains PROC SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So get rid of the second PROC SQL statement after the %include. &amp;nbsp;That begins a separate SAS step that does not have a connection.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2015 11:21:18 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2015-09-22T11:21:18Z</dc:date>
    <item>
      <title>Proc SQL connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226708#M54084</link>
      <description>&lt;P&gt;I'm trying to create table via oracle table. When I tried to run the code below,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%include "/usr/sas/tir/sa_connect.txt";
proc sql;
create table mibipads select * from connection to odbc 
(select bipad,title from mas.bipad_master); 
disconnect from odbc; 
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I got error as,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: CLI error trying to establish connection: [unixODBC][Driver Manager]Data source name not found, and no default driver&lt;BR /&gt;specified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sa_connect.txt file having the details to connect oracle from SAS and I it don't seem issue with this .txt. Can someone guide where I need to tweak the code to run without any errors.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 10:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226708#M54084</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2015-09-22T10:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226710#M54085</link>
      <description>&lt;P&gt;I missed the keyword in my previous post. Code is like,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%include "/usr/sas/tir/sa_connect.txt";
proc sql;
create table mibipads as select * from connection to odbc 
(select bipad,title from mas.bipad_master); 
disconnect from odbc; 
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Sep 2015 10:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226710#M54085</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2015-09-22T10:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226711#M54086</link>
      <description>&lt;P&gt;You are missing the connection part, the syntax is something like:&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; connect to odbc (user="ABC",password=...);&lt;/P&gt;&lt;P&gt;&amp;nbsp; select * from connection to odbc (select * from abc);&lt;/P&gt;&lt;P&gt;&amp;nbsp; disconnect from odbc;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See here for an Oracle version, you will need something similar for your database.&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a003113595.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a003113595.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 10:56:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226711#M54086</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-09-22T10:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226712#M54087</link>
      <description>&lt;P&gt;My connection part in the .txt file and it has,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; connect to odbc (user=*** password=****_proddb dsn='******');&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note: I put a '*' to hide the confidential information in the public forum.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 11:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226712#M54087</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2015-09-22T11:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226713#M54088</link>
      <description>&lt;P&gt;Your %included file already contains PROC SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So get rid of the second PROC SQL statement after the %include. &amp;nbsp;That begins a separate SAS step that does not have a connection.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 11:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226713#M54088</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-09-22T11:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL connect to ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226716#M54089</link>
      <description>&lt;P&gt;Why do you have the connection string in a text file? &amp;nbsp;If so then you only need to put the connect part, and include at the place the included text should appear:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;sa_connect.txt:&lt;/P&gt;&lt;P&gt;connect to odbc (user=*** password=****_proddb dsn='******');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %include "/usr/sas/tir/sa_connect.txt";&lt;/P&gt;&lt;P&gt;&amp;nbsp; select ...;&lt;/P&gt;&lt;P&gt;&amp;nbsp; disconnect...;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 11:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-SQL-connect-to-ODBC/m-p/226716#M54089</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-09-22T11:59:39Z</dc:date>
    </item>
  </channel>
</rss>

