<?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: Reading multiple files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140732#M28318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are trying to read all of the records from one CSV file by using a DO loop during one iteration of the DATA step.&lt;/P&gt;&lt;P&gt;But inside the DO loop you have coded subsetting IF statements that will cause the whole DATA step to re-start.&lt;/P&gt;&lt;P&gt;So once any of those subsetting IF statements are false you will stop processing the current CSV file and move onto the next one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 May 2014 17:46:46 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2014-05-01T17:46:46Z</dc:date>
    <item>
      <title>Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140725#M28311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends, &lt;/P&gt;&lt;P&gt;I normally read multiple files located in single folder easily.&lt;/P&gt;&lt;P&gt;But this time script is running fine but i m not getting resultant observation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to call your help on the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Required files are attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 10:54:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140725#M28311</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-01T10:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140726#M28312</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;Have a look at your log, and the intermediary datasets in the process (i.e. run one step at a time) to identify the issue.&amp;nbsp; If you are still having issues then post the output from the log where it shows errors/warnings, or the exact code and some test input where it is not doing what you want.&amp;nbsp; You need to clarify what "resultant observation" you are not getting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 12:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140726#M28312</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-01T12:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140727#M28313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached folder in zip where files are located and script along with my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its not showing any error its just gicing 0 oberservation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input and infile are correct , i have checked that to read individual file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 12:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140727#M28313</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-01T12:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140728#M28314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aman4SAS.&lt;/P&gt;&lt;P&gt;Intriguing question.&amp;nbsp; You're coding style is not like mine so I am reading your code to learn a style that is different than my own.&amp;nbsp; You have at least 3 implied "If this condition is true, continue, else return to the next row".&amp;nbsp; My suggestion is to fully expand these statements to "If&amp;nbsp; *** then do;&amp;nbsp;&amp;nbsp; else ***; end:" statements and place "Put _all_" statements in strategic locations to find out which of the three "continue this data steps processing" is causing nothing to be written.&amp;nbsp; My first observation is that you do not have any data that does meet all three conditions.&amp;nbsp; Also, SAS has "rules" for handling the reading of multiple datasets; and the two datasets are not the same size; and the end of file condition is met on one of the files sooner than you expect.&amp;nbsp; At this point, if this were my problem, and I knew I had data that should be output,&amp;nbsp; I would be going to ' "Combining SAS Data Sets: Basic Concepts" in Chapter 21 of SAS Language Reference: Concepts'.&amp;nbsp;&amp;nbsp; The quoted portion is from the description of the SET statement in the Dictionary of SAS Statements in the book 'SAS 9.3 Statements Reference'.&amp;nbsp; I am reading the books because I am intrigued and fascinated by your style and I want to learn more about it..&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if LocationType="M";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if SOC in (113021&lt;BR /&gt;119041&lt;BR /&gt;119111&lt;BR /&gt;119121&lt;BR /&gt;151111&lt;BR /&gt;151121&lt;BR /&gt;151122&lt;BR /&gt;151131&lt;BR /&gt;151132&lt;BR /&gt;151133&lt;BR /&gt;151134&lt;BR /&gt;151141&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if SOC NE 0 and SOC/1000 NE round(SOC/1000,1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 13:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140728#M28314</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2014-05-01T13:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140729#M28315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to request to all stop guessing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone would be able to read atleast single observation. let me know so i can improve my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 14:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140729#M28315</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-01T14:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140730#M28316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you use the path ..\temp it's kind of hard to diagnose as that is relative to current active directory. I would recommend explicit paths.&lt;/P&gt;&lt;P&gt;I'm not going to guess what your directory structure may be. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your dirlist dataset populating correctly? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 15:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140730#M28316</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-01T15:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140731#M28317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... attached WORKS1.SAS works,&amp;nbsp; modifying your code just a bit (plus I just put the data in folder Z:\ on my PC) mainly those subsetting IF statements in the loop&amp;nbsp; ... and changed CODELIST to a macro variable&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;%let codelist = %str(113021 119041 119111 119121 151111 151121 151122 151131 151132 151133 151134 151141);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in data step (you need the extra INPUTs to release unused records since you are not returning to the top of the data step while reading each file)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LocationType $ @;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if locationtype ne "M" then do; input; continue; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location $ &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SOC $ @;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if soc ^in (&amp;amp;codelist) then do; input; continue; end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EducationCode &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Volume&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VolumeNew&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if _ERROR_ then call symputx('_EFIERR_',1);&amp;nbsp; /* set ERROR detection macro variable */&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if SOC NE 0 and SOC/1000 NE round(SOC/1000,1) then output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another suggestion (WORKS2.SAS) ... in the data step, you could look at LOCATIONTYPE and SOC first as shown (though given how fast INPUT works I'm not sure why you seem, so concerned with reading the raw data in stages ... seems like overkill to me ... if you are that concerned why leave that last check of SOC to the very end, after you've read all the variables)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, since you have INFORMAT statements, you don't need the informats in the INPUT statement (yes/no?) ... and just curious, why not just one FORMAT and one INFORMAT statement each with multiple variables ... and, why bother with the numeric informats when using LIST input (not needed, yes/no?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input @;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if scan(_infile_,3) eq : "M" and input(scan(_infile_,5),best.) in : (&amp;amp;codelist) then do;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; Year&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; Month&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; LocationType&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; Location &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; SOC&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; EducationCode &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; Volume&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&amp;nbsp; VolumeNew&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if _ERROR_ then call symputx('_EFIERR_',1);&amp;nbsp; /* set ERROR detection macro variable */&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if SOC NE 0 and SOC/1000 NE round(SOC/1000,1) then output; /* Exclude summary records */&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;else input;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 16:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140731#M28317</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2014-05-01T16:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140732#M28318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are trying to read all of the records from one CSV file by using a DO loop during one iteration of the DATA step.&lt;/P&gt;&lt;P&gt;But inside the DO loop you have coded subsetting IF statements that will cause the whole DATA step to re-start.&lt;/P&gt;&lt;P&gt;So once any of those subsetting IF statements are false you will stop processing the current CSV file and move onto the next one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 17:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140732#M28318</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-05-01T17:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140733#M28319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi TOM, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as mentioned above in that case it must read atleast one observation.&lt;/P&gt;&lt;P&gt;but its showing zero observation it seems its not getting inside of csv files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 04:56:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140733#M28319</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-02T04:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140734#M28320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aman4SAS,&amp;nbsp; Tom is right&lt;BR /&gt;Showing the number of obs Observations is telling something on the output dataset. &lt;BR /&gt;When there is nothing to output it will tell you 0....&amp;nbsp;&amp;nbsp;&amp;nbsp; That doesn't say you anything on what has been readed/processed.&lt;/P&gt;&lt;P&gt;The best approach for debugging is eliminating parts of the code (eg %codelist) and see what is happening.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;An other remark: There is no need for that step creating a dirlist, you could define the wildcarding immediate at the filepath statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 05:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140734#M28320</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-02T05:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140735#M28321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I heartily agree that Tom Sir is right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;those subsetting IF statements are false you will stop processing the current CSV file and move onto the next one&lt;/SPAN&gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;at the time moving to next , it must left something behind.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;what i can see, its reading all desired observation but its not putting on Created dataset.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The same program is running very fine for for txt files but its not working in my csv files. so i m confuse to remove my subset conditions,&lt;/P&gt;&lt;P&gt;As per using wildcard. Thanks for your valuable input. I have used that to resolved my problem for temp basis. and it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 05:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140735#M28321</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-02T05:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140736#M28322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aman4SAS,&amp;nbsp; There was a time computer-resources where that expensive you did a lot of desktopwork (paper pencil) preventing mistakes as much as possible. The hollerith cards very patient doing some coding with that. At his era your time is much more valuable than the one of the machine. As long as your causing more trouble (losing data, changing/sending data) a try to verify some assumption is more effective. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put a * (comment or remove) that %codelist (drop that card). Same for the other If _error_&amp;nbsp; if soc.&lt;/P&gt;&lt;P&gt;See what happen, will cost less than a few minutes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;When assumption is right you see obs&amp;gt;0 when still 0 there is something different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you say with txt-files it is working but with csv not. For me a csv-file is just a special text file where a special chosen character has the meaning of column delimiter.&lt;BR /&gt;You are possible confused with those suffixes of files, being believed having a special meaning. Do not be that easy in your believe.&lt;BR /&gt;Just at Windows this done with associations to find an associate program. It makes live easy that way. At Unix and Mainframe they are also existing but associations? no way.&lt;BR /&gt;You are liking probably zip-files. For fun docx xlsx egp pkg and much more are zip-files with a dedicated content for some programs&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; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 06:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140736#M28322</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-02T06:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140737#M28323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your input.&lt;/P&gt;&lt;P&gt;But your code will not work if u have space in your path. Thatsy i need to use create macro variable with nrbquote.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rest is fine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 06:23:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140737#M28323</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-02T06:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140738#M28324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your are right with the spaces being a challenge. The easiest is to avoid them. When you are not able to avoid....&lt;BR /&gt; Working wiht a CLI ("Command Line Interface" Dos-command ssh TSO) you will also have to know how to deal that. When a filename contains spaces it needed to get quoted " at Window ' at Unix. These quotes are also needed at your SAS environment. That is very difficult coding in SAS macro as quotes also have a meaning in SAS. Knowing that requirement and the things around it is able to get to work.&amp;nbsp; Yes solving it with the required quotes in the right context spaces in path will work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 06:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140738#M28324</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-02T06:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140739#M28325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No its not a challenge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just use macro variable with %nrbquote as i did in my code.&lt;/P&gt;&lt;P&gt;Rest is your code is working fine. and i m getting result.&lt;/P&gt;&lt;P&gt;I am agree with TOM that problem was in subsetting or soccode macro.&lt;/P&gt;&lt;P&gt;I found problem was in soccode macro which u resolved very well. i am thankful to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 06:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140739#M28325</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-02T06:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140740#M28326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My Apology , I forgot to see whom i response. I thought its MikeZdeb and shared what i tried in my code. &lt;/P&gt;&lt;P&gt;I do not have 1% knowledge compare than you to let you know what is right or wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please accept my apology.&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 07:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140740#M28326</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-02T07:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140741#M28327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem. You solved your issue. And the macro quoting you are having what is behind there.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 08:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140741#M28327</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-02T08:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140742#M28328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used nrbquote to quote the path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let dirname = &lt;STRONG&gt;%nrbquote("..\temp")&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;%let dirname2 = ..\temp; &lt;/P&gt;&lt;P&gt;%put &amp;amp;dirname &amp;amp;dirname2;&lt;/P&gt;&lt;P&gt;filename DIRLIST pipe "dir /B &amp;amp;dirname\*.csv";&lt;/P&gt;&lt;P&gt;data dirlist ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length fname $256; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile dirlist length=reclen ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input fname $varying256. reclen ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print data = dirlist;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 09:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140742#M28328</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-02T09:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140743#M28329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite what I meant. the string ..\temp is not having big issues but when your path/filename is needing quotes around for Window/Unix the name be like&lt;/P&gt;&lt;P&gt; '..\tmp space\your - dataset.csv'&amp;nbsp;&amp;nbsp;&amp;nbsp; The those quotes are easily conflicting with SAS quoting as variable xcmd or what ever.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi28/011-28.pdf" title="http://www2.sas.com/proceedings/sugi28/011-28.pdf"&gt;http://www2.sas.com/proceedings/sugi28/011-28.pdf&lt;/A&gt; is a nice document about macro quoting. The filename quoting is mentioned, see macro mkfn. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 09:39:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140743#M28329</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-05-02T09:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reading multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140744#M28330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my apology...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think i havent write my ans very clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NRBQUOTE will require only when there is a space in ur path&amp;nbsp; i.e "I:\temp folder\ sas tutorial"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i used ..\temp in my ans just like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is no need to quote when no space in ur path i.e. I:\temp_folder\sas_tutorial\&lt;/P&gt;&lt;P&gt;I hope this time i m clear&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 10:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-multiple-files/m-p/140744#M28330</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2014-05-02T10:15:33Z</dc:date>
    </item>
  </channel>
</rss>

