<?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 File with Apostrophe in title in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106157#M258527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or just use the list of files to generate the code.&amp;nbsp; Here is example to import each CSV file into a separate dataset.&lt;/P&gt;&lt;P&gt;For unix change the command used in the INFILE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%let path = path of folder containing the CSV files ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;filename code temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data csvfiles ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; file code;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; infile "dir ""&amp;amp;path\*.csv"" /b" pipe truncover lrecl=256 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; n+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; length datafile out $32 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; input filename $256.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp; datafile=cats('FILE',n);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; out=cats('DATA',n);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; put 'filename ' datafile filename :$quote. ';'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / 'proc import ' datafile= out= 'dbms=dlm replace ;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / '&amp;nbsp; delimiter='','';'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / 'run;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%inc code / source2 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Feb 2013 19:05:44 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-02-17T19:05:44Z</dc:date>
    <item>
      <title>Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106149#M258519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know a way to read in a csv file that has an aprostophe within its title? I need this to work with a macro variable because these files are within a loop that reads in hundres of other files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the attached code for an example of how I would like to read in a csv file named "O'leary.csv".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data person;&lt;/P&gt;&lt;P&gt;input name $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;O'leary.csv&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set person;&lt;/P&gt;&lt;P&gt;if _n_=1 then call symputx('macro_name',name);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc import datafile="c:\MYDRIVE\&amp;amp;Macro_name." out=newdata replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;BR /&gt;Brandon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2013 22:05:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106149#M258519</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2013-02-11T22:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106150#M258520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First you need to make sure that the length of NAME in the data step is long enough to read the name. By default SAS defaults to 8 characters max when reading character variables.&lt;/P&gt;&lt;P&gt;Either preface the input with: LENGTH NAME $ 11 ; /* or larger*/&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;input name $ 1-11; /* read explicitly from columns 1 to 11/*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did:&lt;/P&gt;&lt;P&gt;proc import datafile="C:\mydrive\O'leary.csv" out = newdata replace; run;&lt;/P&gt;&lt;P&gt;not work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2013 23:28:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106150#M258520</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-02-11T23:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106151#M258521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ballard. SOrry this was an example, and in my actual example the length of my name is well over 200 to account for all file names (up to 200 obviously, but that will never happen).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And for your second question, no.&lt;/P&gt;&lt;P&gt;DOES NOT WORK&lt;/P&gt;&lt;P&gt;proc import datafile="C:\mydrive\O'leary.csv" out = newdata replace; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recieve the ERROR: Option "leary" is not known for infile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: End-of-file encounted in string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the error I am struggling with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 17:11:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106151#M258521</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2013-02-14T17:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106152#M258522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With SAS 9.2.3 and Windows7 I don't receive that error with&lt;/P&gt;&lt;P&gt;proc import datafile="C:\mydrive\O'leary.csv" out = newdata replace; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it successfully imports the trial data I created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does your output look like if you do&lt;/P&gt;&lt;P&gt;%put ="c:\MYDRIVE\&amp;amp;Macro_name.";&lt;/P&gt;&lt;P&gt;If there are lots of blanks after the second slash I would try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if _n_=1 then call symputx('macro_name',strip(name));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 18:40:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106152#M258522</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-02-14T18:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106153#M258523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might be an issue with the version of windows / sas that I am running, because the code you give above does throw an error for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the place I work is still on windows Xp, so that could be a leading contributor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc import datafile="C:\mydrive\O'leary.csv"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 19:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106153#M258523</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2013-02-14T19:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106154#M258524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried a filename assignment and using a fileref?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filename InData "C:\mydrive\O'leary.csv";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and proc import datafile=InData ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The filename might give better diagnostics if there is an actual problem with the filename.&lt;/P&gt;&lt;P&gt;The end of file message looks almost like it is trying to read a pipe or something instead of a literal string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 22:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106154#M258524</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-02-14T22:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106155#M258525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem appears to be in the SCL code that PROC IMPORT is calling to generate the DATA step to read you delimited file.&lt;/P&gt;&lt;P&gt;1) Don't use PROC IMPORT.&amp;nbsp; Instead just write the data step yourself.&lt;/P&gt;&lt;P&gt;2) As others have suggested create a FILEREF and use that in the datafile option of PROC IMPORT.&amp;nbsp; This avoids the SCL code bug.&amp;nbsp; You do not need to create the macro variable as you can just create the FILENAME using the FILENAME() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; set person;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; if filename('CSVFILE',trim(name)) then put "ERROR: Unable to assign FILENAME";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt; line-height: 1.5em;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc import datafile=CSVFILE out=newdata dbms=dlm replace;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; delimiter=',';&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 03:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106155#M258525</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-15T03:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106156#M258526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom has offered the approach that I would normally suggest.&lt;/P&gt;&lt;P&gt;For one-off data investigation proc import might be suitable but in cases like this, where many files must be loaded, surely you will have a way of defining the common layout, or even a small set of layouts. For a single layout common to all CSV files, you don't need hundreds of proc import, JUST ONE DATA STEP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I have grown accustomed to the irrational decision that MUST be implemented so here is another way to accommodate the SCL bug which Tom has identified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just rename all files which contain a single quote mark - something like the dos command&lt;/P&gt;&lt;P&gt;RENAME *'* *#*&lt;/P&gt;&lt;P&gt;you might get it to work but I couldn't&amp;nbsp; - so as normal, I revert to a SAS DATA STEP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPTION NOXWAIT XSYNC ;&lt;/P&gt;&lt;P&gt;%let path = path of folder containing the CSV files ;&lt;/P&gt;&lt;P&gt;%let path = %sysget(userprofile)\documents\my sas files; ***** just for my testing ;&lt;/P&gt;&lt;P&gt;data _null_ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile "dir&amp;nbsp; ""&amp;amp;path\*'*"" /b " device= pipe ; * scanover ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length newname $1024 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; newname =translate( _infile_, "##", "'""" ) ;&lt;/P&gt;&lt;P&gt;* converting both single and double quotes to # ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call system( "rename " !! _infile_ !!"="!! newname ) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; put "original=" _INFILE_ +2 NEWNAME= ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and that did work, because all files containing a ' mark now have their names changed replacing that ' with a #&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those who really need to overcome quotes in a name for proc import have this way to eliminate the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully there are no other defects of this sort in the SCL code invoked by proc import of CSV files. Just in case double quotes in a name might also cause trouble, that short datastep would replace those too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps someone&lt;/P&gt;&lt;P&gt;peterC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 17:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106156#M258526</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-02-17T17:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106157#M258527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or just use the list of files to generate the code.&amp;nbsp; Here is example to import each CSV file into a separate dataset.&lt;/P&gt;&lt;P&gt;For unix change the command used in the INFILE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%let path = path of folder containing the CSV files ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;filename code temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data csvfiles ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; file code;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; infile "dir ""&amp;amp;path\*.csv"" /b" pipe truncover lrecl=256 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; n+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; length datafile out $32 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; input filename $256.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp; datafile=cats('FILE',n);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; out=cats('DATA',n);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; put 'filename ' datafile filename :$quote. ';'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / 'proc import ' datafile= out= 'dbms=dlm replace ;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / '&amp;nbsp; delimiter='','';'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / 'run;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%inc code / source2 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 19:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106157#M258527</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-17T19:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106158#M258528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya Peter. And each csv within the process do not have a common layout, The only thing that can be assumed is that the column names are within the first row. However the order, number of columns, etc.. are not consistent. This is why I am using the proc import, to read in the csv header names and determine what order they are in, what is missing, what is extra, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I could theoritically read in the file using a single line input, and then seperate the names using commas (similar to what Tom has helped me with in another piece of code).&amp;nbsp; I will attempt that later. if anyone has any other method to get only the headers of a csv, without knowing what they are and given there could be anywhere between 2 and 210, please let me know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In addition when I get back to work, I will try both of the codes given to see if renaming the ' will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 21:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106158#M258528</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2013-02-18T21:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106159#M258529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to read the header lines to find which files have which names you can do that in one data step.&lt;/P&gt;&lt;P&gt;Here is an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data csvfile_columns;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; infile 'ls c*.csv' pipe truncover;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input filename $200.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; filevar=filename;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; infile csvfile dsd filevar=filevar truncover obs=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; length column 8 name $200 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; do column = 1 by 1 until (name=' ');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input name @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if name ne ' ' then output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 21:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106159#M258529</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-18T21:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106160#M258530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tom. I am not sure I understand your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'd like to do is take a directory with say 500 Csv files, and read in each file 1 by 1, however for each file, only read in the very first row of data to determine what the column headers are.&amp;nbsp; WHen I run the code above that is not what seems to occur (however I do not fully understand what you are doing in the code above, sorry).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again Tom, thanks very much for all your help. I'm sorry I am not fully able to follow your answer in this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; P.S. note, apparently while proc import does not work by default, the Filename specifiation does seem to work. As that was my original question, I will be marking that as the correct answer, however Tom if you have another more efficient way or reading in a files first row values only, I would greatly love to see it (and hopefully I can understand it).&amp;nbsp; If you'd like, I can start a new thread that way I can credit you with the correct answer for this related problem. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brandon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 16:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106160#M258530</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2013-02-19T16:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106161#M258531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;This program will read the first line of each file.&amp;nbsp; It outputs the result into a vertical structure with the name of the CSV file, the column number and the name of the column. NOTE: &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;If you are running on Windows then change the ls command to dir /b command. Play with the command from the command line until it generates the list in format you want. If you want to use a macro variable reference in the command then use double quote characters (") instead of single quote characters (').&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;Let me add some comments.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;* Make a dataset ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;data csvfile_columns;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * Read output of DIR or ls command to get list of files to process into variable FILENAME;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; infile 'ls *.csv' pipe truncover;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; input filename $200.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * Create copy of FILENAME to use with the FILEVAR option of the INFILE statement ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * This is needed because SAS automatically drops the variable named with the FILEVAR option ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; filevar=filename;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * Point to the file named in FILEVAR using the dummy fileref of CSVFILE.&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * Use the DSD option to indicate the values are separated by commas. ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * use the TRUNCOVER option to stop it from going to the next line. ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * Use the OBS=1 option so that only the first line is read ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; infile csvfile dsd filevar=filevar truncover obs=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * Define attributes for COLUMN and NAME variables ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; length column 8 name $200 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; * Loop until you see an empty column name ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; do column = 1 by 1 until (name=' ');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Read the column name and keep the line open ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input name @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Output put an observation when the name is not empty ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if name ne ' ' then output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;If for some reason you have columns without names you could iterate the loop based on the number of commas in the line.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; input @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; do column = 1 to countw(_infile_,',','Q');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Read the column name and keep the line open ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input name @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Output put an observation&amp;nbsp; ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 16:23:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106161#M258531</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-19T16:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading File with Apostrophe in title</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106162#M258532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a routine to convert your csv files into one SAS dataset, with all columns loaded as $30. strings and each row holds the name of the file from which it is read&lt;/P&gt;&lt;P&gt;%let your_path=c:\temp ;&lt;/P&gt;&lt;P&gt;data all_of _them( compress=yes) ;&lt;/P&gt;&lt;P&gt; length filen filename $100 col1-col210 $30 ;&lt;/P&gt;&lt;P&gt; infile "&amp;amp;your_path\*.csv" truncover dsd lrecl=10000 filename= filen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eov=eov /* indicate end-of each file*/ ;&lt;/P&gt;&lt;P&gt; do row=1 by 1 until( eov) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input col1-col210 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; filename= filen ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output ;&lt;/P&gt;&lt;P&gt; end ;&lt;/P&gt;&lt;P&gt; call missing(eov) ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 23:13:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-File-with-Apostrophe-in-title/m-p/106162#M258532</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-02-19T23:13:06Z</dc:date>
    </item>
  </channel>
</rss>

