<?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: Able to connect to Oracle in EG but not in batch mode in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126653#M10421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I found the sas.sh file and created a wrapper script that includes it, and now it works like a charm.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Sep 2013 19:33:17 GMT</pubDate>
    <dc:creator>Euripedes</dc:creator>
    <dc:date>2013-09-04T19:33:17Z</dc:date>
    <item>
      <title>Able to connect to Oracle in EG but not in batch mode</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126650#M10418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm extracting data from an Oracle DB using PROC SQL. Here's the sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13779009958498155" jivemacro_uid="_13779009958498155" modifiedtitle="true"&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;connect to ORACLE (path='SERVICE_NAME' user='LOGIN' password='PASS' preserve_comments);&lt;/P&gt;
&lt;P&gt;create table SAS_LIB.DESTINATION_TABLE as&lt;/P&gt;
&lt;P&gt;select * from connection to ORACLE (&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select --column names&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from SCHEMA_NAME.SOURCE_TABLE);&lt;/P&gt;
&lt;P&gt;disconnect from ORACLE;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works perfectly when I run it from within Enterprise Guide.&lt;/P&gt;&lt;P&gt;However when I try to run it in batch mode from the Unix server command line...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13779013957712912" jivemacro_uid="_13779013957712912" modifiedtitle="true"&gt;
&lt;P&gt;nohup&amp;nbsp; /sas_path/sas -sysin&amp;nbsp; '/program_path/file_name.sas' &amp;amp;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... I get the following error in the log file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13779017346786907" jivemacro_uid="_13779017346786907" modifiedtitle="true"&gt;
&lt;P&gt;3 proc sql;&lt;/P&gt;
&lt;P&gt;4 connect to ORACLE (path=**** user=**** password=**** preserve_comments);&lt;/P&gt;
&lt;P&gt;Could not load /sasbin/SAS/SAS_9.1/sasexe/sasora (39 images loaded)&lt;/P&gt;
&lt;P&gt;Error:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0509-022 Cannot load module /sasbin/SAS/SAS_9.1/sasexe/sasora.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0509-150&amp;nbsp;&amp;nbsp; Dependent module libclntsh.a(shr.o) could not be loaded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0509-022 Cannot load module libclntsh.a(shr.o).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0509-026 System error: A file or directory in the path name does not exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0509-022 Cannot load module /sasbin/SAS/SAS_9.1/sasexe/sasora.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0509-150&amp;nbsp;&amp;nbsp; Dependent module &lt;/P&gt;
&lt;P&gt;/sasbin/SAS/SAS_9.1/sasexe/sasora could not be loaded.&lt;/P&gt;
&lt;P&gt;ERROR: The SAS/ACCESS Interface to ORACLE cannot be loaded. ERROR: Image SASORA&amp;nbsp;&amp;nbsp; found but not loadable.&lt;/P&gt;
&lt;P&gt;ERROR: A Connection to the ORACLE DBMS is not currently supported, or is not installed at your site.&lt;/P&gt;
&lt;P&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other programs that don't need connection to the Oracle DB work correctly using the above batch submission method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that some autoexec program loads the necessary modules when EG starts. I've searched the /sasbin folder in the server but all autoexec files I could find only loaded libnames and created global macro variables, with no reference to Oracle. The server runs SAS engine 9.1.3 and EG version is 4.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how I can load the missing modules without the need to open Enterprise Guide?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Euripedes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 22:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126650#M10418</guid>
      <dc:creator>Euripedes</dc:creator>
      <dc:date>2013-08-30T22:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Able to connect to Oracle in EG but not in batch mode</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126651#M10419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The used script for batch processing is missing all needed environment settings as deciribed in the configuration guide of the installation for Oracle. It is not an sas-autoexec or sas-config but the scripting at Unix level.&lt;/P&gt;&lt;P&gt;The Eguide WS-server session is also started by some Unix scritping at that one it is solved as it is working.&lt;/P&gt;&lt;P&gt;Ask you Unix support....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Aug 2013 08:09:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126651#M10419</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-08-31T08:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Able to connect to Oracle in EG but not in batch mode</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126652#M10420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a couple of UNIX environment variables which must be set for this to work (eg. LIBPATH).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try and use sas.sh in the environment where you want to run your job. That should initiate the SAS environment as you need it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your command line should look like:&lt;/P&gt;&lt;P&gt;nohup&amp;nbsp; &amp;lt;/opt/sas/conf/Lev1/SASApp/&amp;gt;sas.sh -sysin&amp;nbsp; '/program_path/file_name.sas' &amp;amp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It this still isn't working then you need to investigate how the SAS EG session gets established and you need eventually to set up your own wrapper script (some batch.sh wrapper script around sas.sh which initialises everything additionally you need).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2013 01:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126652#M10420</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-09-01T01:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Able to connect to Oracle in EG but not in batch mode</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126653#M10421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I found the sas.sh file and created a wrapper script that includes it, and now it works like a charm.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 19:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Able-to-connect-to-Oracle-in-EG-but-not-in-batch-mode/m-p/126653#M10421</guid>
      <dc:creator>Euripedes</dc:creator>
      <dc:date>2013-09-04T19:33:17Z</dc:date>
    </item>
  </channel>
</rss>

