<?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: Import weekly files using prompt manager in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216336#M16247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not have a share folder that only contains only the 20 files you have to read, then get SAS to read their names then read each one into SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once they are successfully read move these files to an archive folder ready for the next 20 files to be dumped into the now empty folder. This means your don't need a prompt at all as SAS can process the required files automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you like this approach please let us know. There have been a lot of posts along these lines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2015 09:20:02 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2015-08-04T09:20:02Z</dc:date>
    <item>
      <title>Import weekly files using prompt manager</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216335#M16246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Recently I have posting questions related to SAS EG 4.3 because my new organization is using EG instead of Base SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.T. will dump 20 files into a share folder, and one of them is like this: SG_ApproveCreditApp_20150730.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have 20 import statements pointing to these 20 files, and output to LOANS.SG_ApproveCreditApp_20150730&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every week I have to point the import statement to a new file-name. It is very manual and time consuming. For example, I have to rename SG_ApproveCreditApp_20150805.txt to&amp;nbsp; LOANS.SG_ApproveCreditApp_20150805&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any shortcut? How can I use prompt manager? The prompt can ask me to enter text in YYYYMMDD format and the rest is automated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 08:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216335#M16246</guid>
      <dc:creator>hellind</dc:creator>
      <dc:date>2015-08-04T08:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Import weekly files using prompt manager</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216336#M16247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not have a share folder that only contains only the 20 files you have to read, then get SAS to read their names then read each one into SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once they are successfully read move these files to an archive folder ready for the next 20 files to be dumped into the now empty folder. This means your don't need a prompt at all as SAS can process the required files automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you like this approach please let us know. There have been a lot of posts along these lines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 09:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216336#M16247</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-08-04T09:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import weekly files using prompt manager</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216337#M16248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;+1 to SASKiwi there, and you could use wildcards to read all text files in without knowing the names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another point however is version control.&amp;nbsp; So IT are dumping some files in a directory, if you version that folder with SVN.&amp;nbsp; The files would then need to be named the same each time - the concept of putting information into a filename is not the best idea - so the next set of files would just overwrite the previous ones (keeping the same name) and the version control software would keep track of the files.&amp;nbsp; That way you only have one set of files, and full history on those files.&amp;nbsp; This would be my preferred option, let the technology handle all the audit trail and differences, you only need to worry about importing the files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, why not take it one step further.&amp;nbsp; Your IT group setup a script which runs, copies the files over to the standard area and renames to the standard filenaming, commits the files to the version control system, then batch submits your import program.&amp;nbsp; You come in to find a nice new dataset and email stating xyz was run and here are the logs.&amp;nbsp; Should be straight forward, almost all companies have some sort of automated import facility.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 09:31:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216337#M16248</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-08-04T09:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Import weekly files using prompt manager</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216338#M16249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #f8f8f8;"&gt;I agree, in my previous company, data was stored in a single file &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #f8f8f8;"&gt;SG_ApproveCreditApp.txt with an additional column named as_of_date. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f8f8f8; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;But in my new company, they have been timestamping weekly datasets since 2010. To keep things simple for now, I don't want to change my colleagues behaviour. &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #f8f8f8;"&gt;Each week's file is saved as SG_ApproveCreditApp_20150730.txt. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #f8f8f8;"&gt;If they want to do timeseries analysis, they will first need to merge by:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #f8f8f8;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #f8f8f8;"&gt;data &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #f8f8f8;"&gt;SG_ApproveCreditApp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; background-color: #f8f8f8;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #f8f8f8;"&gt;set &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #f8f8f8;"&gt;SG_ApproveCreditApp_201:;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now I want to automate upload of these text files to SAS. Unfortunately our company did not buy PROC IMPORT, else i can automate in a SAS code. I am stuck with Enterprise Guide.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 09:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216338#M16249</guid>
      <dc:creator>hellind</dc:creator>
      <dc:date>2015-08-04T09:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Import weekly files using prompt manager</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216339#M16250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well,if you can't change the input then your process is always going to be "non-optimal", e.g. star badly is guarenteed to end badly.&lt;/P&gt;&lt;P&gt;I am not sure what you mean they did not buy "proc import", this is a base SAS function which is present in all SAS installs as far as I am aware.&amp;nbsp; That being said though, I would never recommend using it as it is a guessing procedure.&amp;nbsp; You are better off writing a datastep import.&amp;nbsp; If the only files in that area are the 20 in question and they follow the same layout then its simple:&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "...\*.txt" dlm=",";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input ....;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is more than those files, then you would need to preprocess a directory listing:&lt;/P&gt;&lt;P&gt;filename mypipe pipe 'dir "...\*.txt" /b';&lt;/P&gt;&lt;P&gt;data list;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length buffer $200;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile mypipe;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input buffer $;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Then check that list for the files you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they are different format then you would need to write a datastep import for each one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 10:30:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216339#M16250</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-08-04T10:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Import weekly files using prompt manager</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216340#M16251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since "IT" drops the files, they know the names; have your SAS import job also scheduled by IT, and the filenames supplied as environment variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 11:14:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216340#M16251</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-08-04T11:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Import weekly files using prompt manager</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216341#M16252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I'm late to the party.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the issue that you want to find all of the filenames in a folder that contain a particular date string, e.g. 20150805, and then import those specific files into SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's the issue, it's quite doable, but involves SAS code, macros, and the external file functions. It's a bit much for a volunteer forum...do you have any experienced SAS resources who can help you with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First step is to have a much more detailed description of what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 20:57:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216341#M16252</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2015-08-04T20:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Import weekly files using prompt manager</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216342#M16253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Other ideas are welcomed, I did it this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use the free add-in 'Transfer files in/out of SAS' to transfer the CSV from sharedfolder to SASman. This node utilizes prompt manager to ask me the timestamp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Once the CSV is inside SASmain, use INFILE to import to library.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 09:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Import-weekly-files-using-prompt-manager/m-p/216342#M16253</guid>
      <dc:creator>hellind</dc:creator>
      <dc:date>2015-08-05T09:15:01Z</dc:date>
    </item>
  </channel>
</rss>

