<?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: In put mutipul text files into my project in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/272601#M18926</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/84995"&gt;@VicBrookes﻿&lt;/a&gt;&amp;nbsp;You'll find that if you put in any effort and it shows, the forum is more than helpful. Especially if you mock up data and show what you want. You'll get several different versions of code that will solve your issues as long as you ask your question clearly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2016 02:16:57 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-05-24T02:16:57Z</dc:date>
    <item>
      <title>Input multiple text files into my EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271553#M18812</link>
      <description>&lt;P&gt;I was wondering if anyone could help I'm still new to sas and getting the hang of the basics.&lt;/P&gt;
&lt;P&gt;i have text files in the following file structure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File 1&lt;/P&gt;
&lt;P&gt;date 1 date 2 etc etc&lt;/P&gt;
&lt;P&gt;text doc 1 text doc 2 text doc 3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;all my text files are delimited with | and are all the same format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how would I enter all my txt files into one query within sas enterprise guide please?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any example code would be a great help. But I'm afraid you may have to dumb it down for me to be able to understand as I am so new to this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 02:17:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271553#M18812</guid>
      <dc:creator>VicBrookes</dc:creator>
      <dc:date>2016-05-24T02:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: In put mutipul text files into my project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271555#M18813</link>
      <description>&lt;P&gt;There are two options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use the "point and click" capabilities of Enterprise Guide, use the "import data" task to get your data into SAS dataset format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you prefer to write a SAS program, you would open a Program window and write data step code. The SAS documentation covers this process in detail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 23:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271555#M18813</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-05-18T23:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: In put mutipul text files into my project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271556#M18814</link>
      <description>&lt;P&gt;Thank you. I understand the point and click method but this will not&lt;BR /&gt;bring in all the muti files that are sat below my file structure.&lt;BR /&gt;&lt;BR /&gt;I do need to write the code but I would not know where to start as my&lt;BR /&gt;second layer down change names as they are named the date the file was&lt;BR /&gt;created and a similar issue with the txt files themselves as they are&lt;BR /&gt;named date and time of file being written, plus a unique customer&lt;BR /&gt;identifier. I've seen code that uses wildcards but not at a 3 layer&lt;BR /&gt;approach.&lt;BR /&gt;&lt;BR /&gt;I do have something above these files currently that brings them into an&lt;BR /&gt;excel file but with the amount of data I have this is a very timely&lt;BR /&gt;process and I still have to txt to columns after I've brought it in. I&lt;BR /&gt;would like my process to be quicker going forward.&lt;BR /&gt;&lt;BR /&gt;Current Excel VBA code&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ub Button1_Click()&lt;BR /&gt;&lt;BR /&gt;'&lt;BR /&gt;&lt;BR /&gt;Dim fso As Object 'FileSystemObject&lt;BR /&gt;&lt;BR /&gt;Dim fldStart As Object 'Folder&lt;BR /&gt;&lt;BR /&gt;Dim fld As Object 'Folder&lt;BR /&gt;&lt;BR /&gt;Dim fl As Object 'File&lt;BR /&gt;&lt;BR /&gt;Dim Mask As String&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Application.ScreenUpdating = False&lt;BR /&gt;&lt;BR /&gt;Dim newWS As Worksheet&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Set newWS = Sheets.Add(before:=Sheets(1))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Set fso = CreateObject("scripting.FileSystemObject") ' late binding&lt;BR /&gt;&lt;BR /&gt;'Set fso = New FileSystemObject 'or use early binding (also replace&lt;BR /&gt;Object types)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Set fldStart = fso.GetFolder("FILEPATH") ' &amp;lt;-- use your FileDialog&lt;BR /&gt;code here&lt;BR /&gt;&lt;BR /&gt;Mask = "*.txt"&lt;BR /&gt;&lt;BR /&gt;'Debug.Print fldStart.Path &amp;amp; "\"&lt;BR /&gt;&lt;BR /&gt;ListFiles fldStart, Mask&lt;BR /&gt;&lt;BR /&gt;For Each fld In fldStart.SubFolders&lt;BR /&gt;&lt;BR /&gt;ListFiles fld, Mask&lt;BR /&gt;&lt;BR /&gt;ListFolders fld, Mask&lt;BR /&gt;&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Dim myWB As Workbook, WB As Workbook&lt;BR /&gt;&lt;BR /&gt;Set myWB = ThisWorkbook&lt;BR /&gt;&lt;BR /&gt;Dim L As Long, t As Long, i As Long&lt;BR /&gt;&lt;BR /&gt;L = myWB.Sheets(1).Cells(Rows.Count, "A").End(xlUp).Row&lt;BR /&gt;&lt;BR /&gt;t = 1&lt;BR /&gt;&lt;BR /&gt;For i = 1 To L&lt;BR /&gt;&lt;BR /&gt;Workbooks.OpenText Filename:=myWB.Sheets(1).Cells(i, 1).Value,&lt;BR /&gt;DataType:=xlDelimited, Tab:=True&lt;BR /&gt;&lt;BR /&gt;Set WB = ActiveWorkbook&lt;BR /&gt;&lt;BR /&gt;WB.Sheets(1).UsedRange.Copy newWS.Cells(t, 2)&lt;BR /&gt;&lt;BR /&gt;t = myWB.Sheets(1).Cells(Rows.Count, "B").End(xlUp).Row + 1&lt;BR /&gt;&lt;BR /&gt;WB.Close False&lt;BR /&gt;&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;myWB.Sheets(1).Columns(1).Delete&lt;BR /&gt;&lt;BR /&gt;Application.ScreenUpdating = True&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sub ListFolders(fldStart As Object, Mask As String)&lt;BR /&gt;&lt;BR /&gt;Dim fld As Object 'Folder&lt;BR /&gt;&lt;BR /&gt;For Each fld In fldStart.SubFolders&lt;BR /&gt;&lt;BR /&gt;'Debug.Print fld.Path &amp;amp; "\"&lt;BR /&gt;&lt;BR /&gt;ListFiles fld, Mask&lt;BR /&gt;&lt;BR /&gt;ListFolders fld, Mask&lt;BR /&gt;&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 23:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271556#M18814</guid>
      <dc:creator>VicBrookes</dc:creator>
      <dc:date>2016-05-18T23:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: In put mutipul text files into my project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271566#M18815</link>
      <description>&lt;P&gt;A couple of questions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to read every file in a directory, or is there a structure with one directory above another, etc, with the files in a set of directories at the bottom.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know the directory names and file names in advance, or do you need the program to discover them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is really easy to create and use directory and file names as macro variables, like in this example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DirName = C:\Desktop;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; FileName = TestFile.txt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; TestData;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"&amp;amp;DirName.\&amp;amp;FileName."&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; a b c;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 01:20:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271566#M18815</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-05-19T01:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: In put mutipul text files into my project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271573#M18816</link>
      <description>&lt;P&gt;I wrote an article on this a while back. It should help you get started. If you have specific questions post back with what you've tried.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-do-I-write-a-macro-to-import-multiple-text-files-that-have/ta-p/223627" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-do-I-write-a-macro-to-import-multiple-text-files-that-have/ta-p/223627&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 02:16:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/271573#M18816</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-19T02:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: In put mutipul text files into my project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/272567#M18924</link>
      <description>&lt;P&gt;Arrrrrh it was your article I read and tried to work through hence the term "wild card" I really am so new to this sad thing I come from a non developer back ground learn all my stuff from you tube and forums to get my project that far in excel and really am at the stage of leading to walk and your code it taking me in to the marathon. But I'm embracing learning a whole new skill.&lt;/P&gt;&lt;P&gt;I've got this far and willing to learn so if I try again over the next few days and provide you with where I'm going wrong your help would be amazing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 20:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/272567#M18924</guid>
      <dc:creator>VicBrookes</dc:creator>
      <dc:date>2016-05-23T20:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: In put mutipul text files into my project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/272597#M18925</link>
      <description>&lt;P&gt;Don't be discouraged!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you were able to get as far as you did with VB and Excel, you're on the right track for programming.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the great thing is, if you're wanting to process and analyze data, there's nothing better than SAS for that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So your journey is going in the right direction, and we're all here to help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 01:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/272597#M18925</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-05-24T01:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: In put mutipul text files into my project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/272601#M18926</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/84995"&gt;@VicBrookes﻿&lt;/a&gt;&amp;nbsp;You'll find that if you put in any effort and it shows, the forum is more than helpful. Especially if you mock up data and show what you want. You'll get several different versions of code that will solve your issues as long as you ask your question clearly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 02:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Input-multiple-text-files-into-my-EG-project/m-p/272601#M18926</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-24T02:16:57Z</dc:date>
    </item>
  </channel>
</rss>

