<?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: How to Join tables in the folder? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140285#M296452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No,this is a JSL script problem,thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Dec 2014 02:09:08 GMT</pubDate>
    <dc:creator>GoDlike</dc:creator>
    <dc:date>2014-12-09T02:09:08Z</dc:date>
    <item>
      <title>How to Join tables in the folder?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140283#M296450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,guys,here is my problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have several tables in the folder,I want to join them together,merge same name columns,and match them by some conditions,here is my script,running this every time can only open the 1st table in the folder,this is my JSL script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mypath = (mypath);&lt;/P&gt;&lt;P&gt;Set Current Directory( mypath );&lt;/P&gt;&lt;P&gt;y = Files In Directory( mypath );&lt;/P&gt;&lt;P&gt;For( i = N Items( y ), i &amp;gt; 0, i--,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If( Ends With( y&lt;I&gt;, "jmp" ),&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Remove From( y, i )&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;n = N Items( y );&lt;/P&gt;&lt;P&gt;For( i = 1, i &amp;lt;= n, i++,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* If the file is the first in the list, open it. Otherwise, open the table, join with the main table, and close the table just opened. */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If( i == 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mainDt = Open( mypath || y&lt;I&gt; );&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt = Open( mypath || y&lt;I&gt; ) ;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mainDt = mainDt &amp;lt;&amp;lt; join ( dt,Merge Same Name Columns,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; By matching Columns(:col1 = :col2),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Append to First Table );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Close( dt, NoSave );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wait( 0 );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;/* Give the final table a name. */&lt;/P&gt;&lt;P&gt;mainDt&amp;lt;&amp;lt; Set Name( "Join Files" );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I realise this function?&lt;/P&gt;&lt;P&gt;thanks for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 07:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140283#M296450</guid>
      <dc:creator>GoDlike</dc:creator>
      <dc:date>2014-12-08T07:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join tables in the folder?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140284#M296451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you asking how to combine SAS data sets using SAS?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 15:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140284#M296451</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-12-08T15:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join tables in the folder?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140285#M296452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No,this is a JSL script problem,thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 02:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140285#M296452</guid>
      <dc:creator>GoDlike</dc:creator>
      <dc:date>2014-12-09T02:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Join tables in the folder?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140286#M296453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should post in the JMP sub-forum &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 02:28:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Join-tables-in-the-folder/m-p/140286#M296453</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-09T02:28:42Z</dc:date>
    </item>
  </channel>
</rss>

