<?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 Store,Read and then delete multiple files in SAS automatically? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/379036#M276853</link>
    <description>&lt;P&gt;I have an addition to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;'s outline, &lt;STRONG&gt;before&lt;/STRONG&gt; permanently deleting files&amp;nbsp;perform some verification that you may have the data correctly read/ processed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are contemplating using Proc Import 10K times expect to spend a lot of time getting variable types and lengths aligned afterwards.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 14:43:23 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-07-25T14:43:23Z</dc:date>
    <item>
      <title>How to Store,Read and then delete multiple files in SAS automatically?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/378998#M276850</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a temporary folder from where I used read the different xml files from SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am trying to do something more complicated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to store only 10K files at a single time in my temporary folder and once I am done with reading the first 10K files from SAS, I want to delete them from the temporary folder and store the next 10K files inside the temporary and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I am a beginner to SAS, I would also like to know know can I dynamically read the files one by one as all my files are of different names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 13:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/378998#M276850</guid>
      <dc:creator>jjames1</dc:creator>
      <dc:date>2017-07-25T13:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Store,Read and then delete multiple files in SAS automatically?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/379029#M276851</link>
      <description>&lt;P&gt;For point 1 - how are the files getting into the folder - that is where you should be limiting things if there are too many in the folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For point 2 - get a directory listing - many examples on here for this please search, for example:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/read-a-list-of-file-names-with-blanks-by-filename-pipe/m-p/246525/highlight/true#M35532" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/read-a-list-of-file-names-with-blanks-by-filename-pipe/m-p/246525/highlight/true#M35532&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can then use that dir list to either generate code, or call macros etc.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 14:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/379029#M276851</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-25T14:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Store,Read and then delete multiple files in SAS automatically?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/379031#M276852</link>
      <description>&lt;P&gt;Here's the general idea, just to see if this fits what you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Put 10,000 files into your temporary folder.&amp;nbsp; I have to assume you can do that already.&lt;/P&gt;
&lt;P&gt;2. SAS can issue a system command to get a list of all the files in the folder.&amp;nbsp; (See the X statement, and the %SYSEXEC statement.)&amp;nbsp; Route that list to a file. The format of that system command changes, depending on the operating system.&lt;/P&gt;
&lt;P&gt;3. Read the file to get a SAS data set holding the names of all files in your folder.&lt;/P&gt;
&lt;P&gt;4. Process each file (possibly using macro language, depends on what "processing" means).&lt;/P&gt;
&lt;P&gt;5. Issue another X or %SYSEXEC command to delete all files in the folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Repeat as needed.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 14:36:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/379031#M276852</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-25T14:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Store,Read and then delete multiple files in SAS automatically?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/379036#M276853</link>
      <description>&lt;P&gt;I have an addition to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;'s outline, &lt;STRONG&gt;before&lt;/STRONG&gt; permanently deleting files&amp;nbsp;perform some verification that you may have the data correctly read/ processed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are contemplating using Proc Import 10K times expect to spend a lot of time getting variable types and lengths aligned afterwards.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 14:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Store-Read-and-then-delete-multiple-files-in-SAS/m-p/379036#M276853</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-07-25T14:43:23Z</dc:date>
    </item>
  </channel>
</rss>

