<?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: Executing external SQL file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480236#M286591</link>
    <description>Just throwing an idea (I don't have access right so untested).&lt;BR /&gt;Perhaps a macro that holds the connect to stuff, and %include to your SQL script file (name pramterized and specified in the macro call).&lt;BR /&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; I would like to know the reason for driving this through SAS.</description>
    <pubDate>Sun, 22 Jul 2018 13:59:36 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2018-07-22T13:59:36Z</dc:date>
    <item>
      <title>Executing external SQL file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480060#M286588</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does SAS support any way to execute an external SQL script? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dozen scripts, with 100's of statements that would require me to wrap each statement with EXECUTE( ) BY TERA to use with pass-through facility. &amp;nbsp;I'm open to suggestions for ways I can use SAS to execute the scripts.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 20:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480060#M286588</guid>
      <dc:creator>az123</dc:creator>
      <dc:date>2018-07-20T20:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Executing external SQL file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480080#M286589</link>
      <description>&lt;P&gt;You could build the code as text, then run it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename terasql temp;

data _null_;
length sqlStatement $2000;
infile ...;
input...;
/* Build SQL code here into */
file terasql;
put sqlStatement;
run;

proc sql;
connect to ...;
%include terasql; 
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jul 2018 22:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480080#M286589</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-07-20T22:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Executing external SQL file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480088#M286590</link>
      <description>&lt;P&gt;Why not just ask the operating system to use BTEQ to run the script for you?&lt;/P&gt;
&lt;P&gt;You can use the PIPE engine or one of the many commands that SAS has for running operating system commands.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 22:21:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480088#M286590</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-07-20T22:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Executing external SQL file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480236#M286591</link>
      <description>Just throwing an idea (I don't have access right so untested).&lt;BR /&gt;Perhaps a macro that holds the connect to stuff, and %include to your SQL script file (name pramterized and specified in the macro call).&lt;BR /&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; I would like to know the reason for driving this through SAS.</description>
      <pubDate>Sun, 22 Jul 2018 13:59:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Executing-external-SQL-file/m-p/480236#M286591</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-07-22T13:59:36Z</dc:date>
    </item>
  </channel>
</rss>

