<?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 Join working when executed in Editor, but not when %included in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143822#M261786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the encoding of you SAS session and encoding of your file is different? When you look into table and joinTable do you see tha same key values?&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;%include "c:\temp\test.sas" /encoding='&amp;lt;encoding fo the file&amp;gt;';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jul 2014 13:35:29 GMT</pubDate>
    <dc:creator>gergely_batho</dc:creator>
    <dc:date>2014-07-31T13:35:29Z</dc:date>
    <item>
      <title>PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143814#M261778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm facing the following problem. All I want to do is joining a table on another table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA table;&lt;/P&gt;&lt;P&gt;&amp;nbsp; INPUT&amp;nbsp; KEY $ JUST_SOMETHING; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CARDS ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 03010 654&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03020 54&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03030 4545&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03040 5465&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03050 45464&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03060 54645&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03070 4565466&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA joinTable;&lt;/P&gt;&lt;P&gt;&amp;nbsp; INPUT&amp;nbsp; KEY $ COL; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CARDS ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 03010 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03020 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03030 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03040 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03050 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03060 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03070 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03080 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03090 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04010 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04020 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04025 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04030 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04040 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04050 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04060 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04210 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04220 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04230 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04240 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04250 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04260 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04270 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04310 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04320 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04350 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04410 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04420 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04430 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04440 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04450 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04610 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04620 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04621 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04630 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04631 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04640 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04650 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04655 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04660 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04670 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04680 4&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04690 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04700 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04710 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04720 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04730 5&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04800 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04810 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04850 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04910 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04920 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04930 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 04940 6&lt;/P&gt;&lt;P&gt;&amp;nbsp; 08050 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 08060 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 09009 99&lt;/P&gt;&lt;P&gt;&amp;nbsp; 09010 99&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CREATE Table resultTable as&lt;/P&gt;&lt;P&gt;&amp;nbsp; SELECT tab.*, joi.COL FROM table as tab&lt;/P&gt;&lt;P&gt;&amp;nbsp; LEFT JOIN joinTable as joi&lt;/P&gt;&lt;P&gt;&amp;nbsp; ON tab.KEY = joi.KEY;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine as long as I execute it alltogether. But when pasting the second 2 commands into another file (test.sas) and including it, the join does not seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA table;&lt;/P&gt;&lt;P&gt;&amp;nbsp; INPUT&amp;nbsp; KEY $ JUST_SOMETHING; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CARDS ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 03010 654&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03020 54&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03030 4545&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03040 5465&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03050 45464&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03060 54645&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03070 4565466&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "&amp;amp;inc\test.sas";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Fabian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using SAS 9.2 TS Level 2M3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 07:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143814#M261778</guid>
      <dc:creator>Fabian</dc:creator>
      <dc:date>2014-07-31T07:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143815#M261779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used %INCLUDE "F:\SAS CODE\SAS SAMPLE CODE\INCLUDE TEST.SAS"; and it ran successfully.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What error are you getting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 07:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143815#M261779</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2014-07-31T07:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143816#M261780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried to include the absolute path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA table;&lt;/P&gt;&lt;P&gt;&amp;nbsp; INPUT&amp;nbsp; KEY $ JUST_SOMETHING;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CARDS ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03010 654&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03020 54&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03030 4545&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03040 5465&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03050 45464&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03060 54645&lt;/P&gt;&lt;P&gt;&amp;nbsp; 03070 4565466&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "G:\temp\TEST.SAS";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This didn't solve the problem. It's interesting, that there is no error Message (that's why it took me some time to identify the problem, though):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2292&lt;/P&gt;&lt;P&gt;2293&lt;/P&gt;&lt;P&gt;2294&amp;nbsp; DATA table;&lt;/P&gt;&lt;P&gt;2295&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INPUT&amp;nbsp; KEY $ JUST_SOMETHING;&lt;/P&gt;&lt;P&gt;2296&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CARDS ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.TABLE has 7 observations and 2 variables.&lt;/P&gt;&lt;P&gt;NOTE: Compressing data set WORK.TABLE increased size by 100.00 percent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compressed is 2 pages; un-compressed would require 1 pages.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2304&amp;nbsp; RUN;&lt;/P&gt;&lt;P&gt;2305&lt;/P&gt;&lt;P&gt;2306&amp;nbsp; %include "G:\temp\TEST.SAS";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.JOINTABLE has 58 observations and 2 variables.&lt;/P&gt;&lt;P&gt;NOTE: Compressing data set WORK.JOINTABLE increased size by 100.00 percent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compressed is 2 pages; un-compressed would require 1 pages.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Compressing data set WORK.RESULTTABLE increased size by 100.00 percent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compressed is 2 pages; un-compressed would require 1 pages.&lt;/P&gt;&lt;P&gt;NOTE: Table WORK.RESULTTABLE created, with 7 rows and 3 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The resulting table also shows the joined column (COL), but it is empty:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;03010&amp;nbsp;&amp;nbsp; 654&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;03020&amp;nbsp;&amp;nbsp;&amp;nbsp; 54&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm expecting a table (which I'm getting when exectuting the code without %include):&lt;/P&gt;&lt;P&gt;03010&amp;nbsp;&amp;nbsp;&amp;nbsp; 654&amp;nbsp;&amp;nbsp; 99&lt;/P&gt;&lt;P&gt;03020&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 54&amp;nbsp;&amp;nbsp; 99&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Fabian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 07:35:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143816#M261780</guid>
      <dc:creator>Fabian</dc:creator>
      <dc:date>2014-07-31T07:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143817#M261781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add options source2; to the top of the code that contains your include.&amp;nbsp; Check your log to see if your SQL code is reflective of what you have in your test.sas file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 07:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143817#M261781</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2014-07-31T07:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143818#M261782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Log with source2 option looks fine for me, see below, but still no success. &lt;/P&gt;&lt;P&gt;%includes normally work fine, it only happens with PROC SQL Joins (at least thats my impression so far).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just tried to replace the "=" by "eq" within the PROC SQL step, but without success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could replicate the problem on another computer.&lt;/P&gt;&lt;P&gt;Can you replicate it as well or does it work for you? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5597&lt;/P&gt;&lt;P&gt;5598&amp;nbsp; options source2;&lt;/P&gt;&lt;P&gt;5599&lt;/P&gt;&lt;P&gt;5600&amp;nbsp; DATA table;&lt;/P&gt;&lt;P&gt;5601&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INPUT&amp;nbsp; KEY $ JUST_SOMETHING;&lt;/P&gt;&lt;P&gt;5602&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CARDS ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.TABLE has 7 observations and 2 variables.&lt;/P&gt;&lt;P&gt;NOTE: Compressing data set WORK.TABLE increased size by 100.00 percent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compressed is 2 pages; un-compressed would require 1 pages.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5610&amp;nbsp; RUN;&lt;/P&gt;&lt;P&gt;5611&lt;/P&gt;&lt;P&gt;5612&amp;nbsp; %include "G:\temp\TEST.SAS";&lt;/P&gt;&lt;P&gt;NOTE: %INCLUDE (level 1) file G:\temp\TEST.SAS is file G:\temp\TEST.SAS.&lt;/P&gt;&lt;P&gt;5613 +&lt;/P&gt;&lt;P&gt;5614 +DATA joinTable;&lt;/P&gt;&lt;P&gt;5615 + INPUT&amp;nbsp; KEY $ COL;&lt;/P&gt;&lt;P&gt;5616 + CARDS ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.JOINTABLE has 58 observations and 2 variables.&lt;/P&gt;&lt;P&gt;NOTE: Compressing data set WORK.JOINTABLE increased size by 100.00 percent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compressed is 2 pages; un-compressed would require 1 pages.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5675 +RUN;&lt;/P&gt;&lt;P&gt;5676 +&lt;/P&gt;&lt;P&gt;5677 +PROC SQL;&lt;/P&gt;&lt;P&gt;5678 + CREATE Table resultTable as&lt;/P&gt;&lt;P&gt;5679 + SELECT tab.*, joi.COL FROM table as tab&lt;/P&gt;&lt;P&gt;5680 + LEFT JOIN joinTable as joi&lt;/P&gt;&lt;P&gt;5681 + ON tab.KEY = joi.KEY;&lt;/P&gt;&lt;P&gt;NOTE: Compressing data set WORK.RESULTTABLE increased size by 100.00 percent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compressed is 2 pages; un-compressed would require 1 pages.&lt;/P&gt;&lt;P&gt;NOTE: Table WORK.RESULTTABLE created, with 7 rows and 3 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5682 +QUIT;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: %INCLUDE (level 1) ending.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 08:03:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143818#M261782</guid>
      <dc:creator>Fabian</dc:creator>
      <dc:date>2014-07-31T08:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143819#M261783</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 could not replicate this (though am using 9.3).&amp;nbsp; Could I suggest that you open a new session, no autoexec startups etc., ensure the work directory is empty, add all the output options (shouldn't make a diff) options mlogic mprint symbolgen, then run it with full include path.&amp;nbsp; If the output file still has it, then I would suggest at support desk ticket, or you could try moving the SQL part back to you main program, and then the dataset and just leave the sql in include.&amp;nbsp; TBH I see no reason why this would happen.&amp;nbsp; All I can think of is that the processes that SQL is doing in the background is being done in a different place to when it is run interactively, and you don't have permissions there, hence it fails to create a merged part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 08:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143819#M261783</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-31T08:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143820#M261784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I started a new session, work is empty, output options on, Include with full path. No success and still no error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I the meantime I also tried a few more things. The problem disappears when both tables are either initialized in the main (and the proc sql stays in the include) or all 3 steps are in the include file. This means that the problem only emerges, when the base and join tables are initialized in different scripts (which is something I do quite often).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some other workarounds that didn't work:&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;Data table;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set table;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the beginning of the included script (to reset the table within the script) --&amp;gt; no success&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Saving the tables not in the work-directory --&amp;gt; no success&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) &lt;/P&gt;&lt;P&gt;Data table;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set tmp.table;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saving the tables not in the work-directory -&amp;gt; Loading them to work directory within inlcuded script --&amp;gt; no success&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 08:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143820#M261784</guid>
      <dc:creator>Fabian</dc:creator>
      <dc:date>2014-07-31T08:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143821#M261785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Personally I think that looks like a scope issue in the pre-processor.&amp;nbsp; As for how to fix it I am not sure.&amp;nbsp; Is SAS locally installed?&amp;nbsp; I would suggest your SAS people if not locally or support ticket.&lt;/P&gt;&lt;P&gt;Sorry I can't be more help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 08:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143821#M261785</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-07-31T08:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Join working when executed in Editor, but not when %included</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143822#M261786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the encoding of you SAS session and encoding of your file is different? When you look into table and joinTable do you see tha same key values?&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;%include "c:\temp\test.sas" /encoding='&amp;lt;encoding fo the file&amp;gt;';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 13:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Join-working-when-executed-in-Editor-but-not-when/m-p/143822#M261786</guid>
      <dc:creator>gergely_batho</dc:creator>
      <dc:date>2014-07-31T13:35:29Z</dc:date>
    </item>
  </channel>
</rss>

