<?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: proc import generates invalid sas name error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432434#M68720</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The code does not state how to actually produce the datasets with a proc sql or datastep&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;If you want the code generated, run the PROC IMPORT a single time, without the macro portion. Then the code will be in the log that you can embed in your macro or adapt however you want to use. But the macro does what you wanted, which is import files so it seems to meet your requirements.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2018 18:58:04 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-01-30T18:58:04Z</dc:date>
    <item>
      <title>proc import generates invalid sas name error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432261#M68713</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; DorsHHFPath =/dorsshare/HHFit;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;DorsHHFPath;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; drive(dir,ext); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%local&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; cnt filrf rc did memcnt name; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; cnt=0; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; filrf=mydir; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rc=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(filename(filrf,&amp;amp;dir)); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; did=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(dopen(&amp;amp;filrf));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;did ne &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; memcnt=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(dnum(&amp;amp;did)); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;memcnt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; name=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%qscan&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%qsysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(dread(&amp;amp;did,&amp;amp;i)),-1,.);&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%qupcase&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%qsysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(dread(&amp;amp;did,&amp;amp;i))) ne &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%qupcase&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&amp;amp;name) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%superq&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(ext) = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%superq&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(name) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; cnt=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%eval&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&amp;amp;cnt+1); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%qsysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(dread(&amp;amp;did,&amp;amp;i)); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt; proc import datafile=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"&amp;amp;dir\%qsysfunc(dread(&amp;amp;did,&amp;amp;i))"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; out=dsn&amp;amp;cnt &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dbms=csv replace;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%put&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;amp;dir cannot be open.;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rc=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(dclose(&amp;amp;did)); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;%mend&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; drive;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;drive&lt;/I&gt;&lt;/STRONG&gt;(&amp;amp;DorsHHFPath,csv)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;The above script is supposed to import all contents of the &lt;FONT face="Courier New"&gt;&amp;amp;DorsHHFPath share drive into a sas dataset.&amp;nbsp; It is a series of folders with some having .csv files inside.&amp;nbsp; Instead I get this error&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;26 %macro drive(dir,ext);&lt;/P&gt;
&lt;P&gt;ERROR: Invalid macro name (. It should be a valid SAS identifier no longer than 32 characters.&lt;/P&gt;
&lt;P&gt;ERROR: A dummy macro will be compiled.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;I researched the error on google however it does not seem to answer why this is happening in my case.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:40:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432261#M68713</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2018-01-30T15:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc import generates invalid sas name error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432273#M68714</link>
      <description>&lt;P&gt;Must be something before the macro definition. The macro compiles and executes without any error.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432273#M68714</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-01-30T15:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: proc import generates invalid sas name error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432275#M68715</link>
      <description>&lt;P&gt;Run the macro with Option mprint and post the full log please.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:52:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432275#M68715</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T15:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc import generates invalid sas name error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432280#M68716</link>
      <description>&lt;P&gt;I ran your code with my own file path and there were no issues, it ran fine and imported the CSV file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 15:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432280#M68716</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T15:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: proc import generates invalid sas name error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432305#M68717</link>
      <description>&lt;P&gt;When you get an error sometimes it come from a missing ; or unclosed quote or parentheses prior to the actual statement.&lt;/P&gt;
&lt;P&gt;If that is the case here then when %macro is encountered it is not seeing the code as a macro definition but an invocation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Save the program. Restart SAS as some of these errors are hard to correct for once a macro has been called or attempted.&lt;/P&gt;
&lt;P&gt;Start with an empty log and re-run the program. Check the log carefully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also a long shot: if you copied this code from elsewhere there is a small chance that you have non-visible characters embedded in the code and those are making the compiler think that that your macro name is something besides "drive".&lt;/P&gt;
&lt;P&gt;Note that the error:&lt;/P&gt;
&lt;PRE&gt;ERROR: Invalid macro name (. &lt;/PRE&gt;
&lt;P&gt;shows that SAS thinks you are invoking or compiling&amp;nbsp;a macro named "( "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might help to show the log with the code and error message. And paste it into a code box opened with the forum {I} icon to preserve error message formatting as the main windows here will reformat text and code. (Or do you really not indent any code???)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 16:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432305#M68717</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-30T16:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc import generates invalid sas name error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432428#M68719</link>
      <description>&lt;P&gt;I did restart the pc and sas sessions and the code does in fact run without issues.&amp;nbsp; Here is the log.&amp;nbsp; The code does not state how to actually produce the datasets with a proc sql or datastep.&amp;nbsp; This is where I got the code&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=n0ctmldxf23ixtn1kqsoh5bsgmg8.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p1pqdh4dy4h517n156xx9ftfndsd\" target="_blank"&gt;http://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=n0ctmldxf23ixtn1kqsoh5bsgmg8.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p1pqdh4dy4h517n156xx9ftfndsd\&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 The SAS System 13:46 Tuesday, January 30, 2018&lt;/P&gt;
&lt;P&gt;1 ;*';*";*/;quit;run;&lt;/P&gt;
&lt;P&gt;2 OPTIONS PAGENO=MIN;&lt;/P&gt;
&lt;P&gt;3 %LET _CLIENTTASKLABEL='HHF_Test_Program4';&lt;/P&gt;
&lt;P&gt;4 %LET _CLIENTPROJECTPATH='';&lt;/P&gt;
&lt;P&gt;5 %LET _CLIENTPROJECTNAME='';&lt;/P&gt;
&lt;P&gt;6 %LET _SASPROGRAMFILE=;&lt;/P&gt;
&lt;P&gt;7&lt;/P&gt;
&lt;P&gt;8 ODS _ALL_ CLOSE;&lt;/P&gt;
&lt;P&gt;9 OPTIONS DEV=ACTIVEX;&lt;/P&gt;
&lt;P&gt;10 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;/P&gt;
&lt;P&gt;11 FILENAME EGSR TEMP;&lt;/P&gt;
&lt;P&gt;12 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;/P&gt;
&lt;P&gt;13 STYLE=HtmlBlue&lt;/P&gt;
&lt;P&gt;14 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome2/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")&lt;/P&gt;
&lt;P&gt;15 NOGTITLE&lt;/P&gt;
&lt;P&gt;16 NOGFOOTNOTE&lt;/P&gt;
&lt;P&gt;17 GPATH=&amp;amp;sasworklocation&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable SASWORKLOCATION resolves to "/egwork/SAS_work998500002E5A_ga016ada6.suntrust.com/SAS_workE3FB00002E5A_ga016ada6.suntrust.com/"&lt;/P&gt;
&lt;P&gt;18 ENCODING=UTF8&lt;/P&gt;
&lt;P&gt;19 options(rolap="on")&lt;/P&gt;
&lt;P&gt;20 ;&lt;/P&gt;
&lt;P&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;/P&gt;
&lt;P&gt;21&lt;/P&gt;
&lt;P&gt;22 %let DorsHHFPath =/dorsshare/HHFit;&lt;/P&gt;
&lt;P&gt;23 %put &amp;amp;DorsHHFPath;&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DORSHHFPATH resolves to /dorsshare/HHFit&lt;/P&gt;
&lt;P&gt;/dorsshare/HHFit&lt;/P&gt;
&lt;P&gt;24&lt;/P&gt;
&lt;P&gt;25 %macro drive(dir,ext);&lt;/P&gt;
&lt;P&gt;26 %local cnt filrf rc did memcnt name;&lt;/P&gt;
&lt;P&gt;27 %let cnt=0;&lt;/P&gt;
&lt;P&gt;28&lt;/P&gt;
&lt;P&gt;29 %let filrf=mydir;&lt;/P&gt;
&lt;P&gt;30 %let rc=%sysfunc(filename(filrf,&amp;amp;dir));&lt;/P&gt;
&lt;P&gt;31 %let did=%sysfunc(dopen(&amp;amp;filrf));&lt;/P&gt;
&lt;P&gt;32 %if &amp;amp;did ne 0 %then %do;&lt;/P&gt;
&lt;P&gt;33 %let memcnt=%sysfunc(dnum(&amp;amp;did));&lt;/P&gt;
&lt;P&gt;34&lt;/P&gt;
&lt;P&gt;35 %do i=1 %to &amp;amp;memcnt;&lt;/P&gt;
&lt;P&gt;36&lt;/P&gt;
&lt;P&gt;37 %let name=%qscan(%qsysfunc(dread(&amp;amp;did,&amp;amp;i)),-1,.);&lt;/P&gt;
&lt;P&gt;38&lt;/P&gt;
&lt;P&gt;39 %if %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) %then %do;&lt;/P&gt;
&lt;P&gt;40 %if %superq(ext) = %superq(name) %then %do;&lt;/P&gt;
&lt;P&gt;41 %let cnt=%eval(&amp;amp;cnt+1);&lt;/P&gt;
&lt;P&gt;42 %put %qsysfunc(dread(&amp;amp;did,&amp;amp;i));&lt;/P&gt;
&lt;P&gt;43 proc import datafile="&amp;amp;dir\%qsysfunc(dread(&amp;amp;did,&amp;amp;i))" out=dsn&amp;amp;cnt&lt;/P&gt;
&lt;P&gt;44 dbms=csv replace;&lt;/P&gt;
&lt;P&gt;45 run;&lt;/P&gt;
&lt;P&gt;46 %end;&lt;/P&gt;
&lt;P&gt;47 %end;&lt;/P&gt;
&lt;P&gt;48&lt;/P&gt;
&lt;P&gt;49 %end;&lt;/P&gt;
&lt;P&gt;50 %end;&lt;/P&gt;
&lt;P&gt;51 %else %put &amp;amp;dir cannot be open.;&lt;/P&gt;
&lt;P&gt;52 %let rc=%sysfunc(dclose(&amp;amp;did));&lt;/P&gt;
&lt;P&gt;53&lt;/P&gt;
&lt;P&gt;54 %mend drive;&lt;/P&gt;
&lt;P&gt;2 The SAS System 13:46 Tuesday, January 30, 2018&lt;/P&gt;
&lt;P&gt;55 %drive(&amp;amp;DorsHHFPath,csv)&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): Beginning execution.&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DORSHHFPATH resolves to /dorsshare/HHFit&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): Parameter DIR has value /dorsshare/HHFit&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): Parameter EXT has value csv&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LOCAL CNT FILRF RC DID MEMCNT NAME&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is CNT)&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is FILRF)&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is RC)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DIR resolves to /dorsshare/HHFit&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is DID)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable FILRF resolves to mydir&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition &amp;amp;did ne 0 is TRUE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is MEMCNT)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable MEMCNT resolves to 23&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop beginning; index variable I; start value is 1; stop value is 23; by value is 1.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to sc&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 2; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 2&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 2&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to FL&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 3; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 3&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 3&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to al&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 4; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 4&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 4&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to az&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 5; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 5&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;3 The SAS System 13:46 Tuesday, January 30, 2018&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 5&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to ca&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 6; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 6&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 6&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to dc&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 7; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 7&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 7&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to ehlp&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 8; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 8&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 8&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to ga&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 9; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 9&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 9&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to il&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 10; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 10&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 10&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to in&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 11; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 11&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 11&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to ky&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;4 The SAS System 13:46 Tuesday, January 30, 2018&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 12; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 12&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 12&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to md&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 13; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 13&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 13&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to mi&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 14; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 14&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 14&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to ms&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 15; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 15&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 15&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to nc&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 16; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 16&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 16&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to nj&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 17; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 17&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 17&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to nv&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 18; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 18&lt;/P&gt;
&lt;P&gt;5 The SAS System 13:46 Tuesday, January 30, 2018&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 18&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to lnk&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is TRUE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %superq(ext) = %superq(name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 19; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 19&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 19&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to or&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 20; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 20&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 20&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to ri&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 21; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 21&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 21&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to tn&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 22; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 22&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 22&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to oh&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 23; loop will iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is NAME)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 23&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable I resolves to 23&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable NAME resolves to db&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is TRUE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %IF condition %superq(ext) = %superq(name) is FALSE&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %DO loop index variable I is now 24; loop will not iterate again.&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): %LET (variable name is RC)&lt;/P&gt;
&lt;P&gt;SYMBOLGEN: Macro variable DID resolves to 1&lt;/P&gt;
&lt;P&gt;MLOGIC(DRIVE): Ending execution.&lt;/P&gt;
&lt;P&gt;56&lt;/P&gt;
&lt;P&gt;57 %LET _CLIENTTASKLABEL=;&lt;/P&gt;
&lt;P&gt;6 The SAS System 13:46 Tuesday, January 30, 2018&lt;/P&gt;
&lt;P&gt;58 %LET _CLIENTPROJECTPATH=;&lt;/P&gt;
&lt;P&gt;59 %LET _CLIENTPROJECTNAME=;&lt;/P&gt;
&lt;P&gt;60 %LET _SASPROGRAMFILE=;&lt;/P&gt;
&lt;P&gt;61&lt;/P&gt;
&lt;P&gt;62 ;*';*";*/;quit;run;&lt;/P&gt;
&lt;P&gt;63 ODS _ALL_ CLOSE;&lt;/P&gt;
&lt;P&gt;64&lt;/P&gt;
&lt;P&gt;65&lt;/P&gt;
&lt;P&gt;66 QUIT; RUN;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 18:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432428#M68719</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2018-01-30T18:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: proc import generates invalid sas name error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432434#M68720</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The code does not state how to actually produce the datasets with a proc sql or datastep&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;If you want the code generated, run the PROC IMPORT a single time, without the macro portion. Then the code will be in the log that you can embed in your macro or adapt however you want to use. But the macro does what you wanted, which is import files so it seems to meet your requirements.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 18:58:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432434#M68720</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-30T18:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc import generates invalid sas name error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432575#M68722</link>
      <description>&lt;P&gt;Except for one time the line resolving similar to this:&lt;/P&gt;
&lt;PRE&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is FALSE&lt;/PRE&gt;
&lt;P&gt;is False so the proc import is not executed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the&amp;nbsp;times it is true such as&lt;/P&gt;
&lt;PRE&gt;MLOGIC(DRIVE): %IF condition %qupcase(%qsysfunc(dread(&amp;amp;did,&amp;amp;i))) ne %qupcase(&amp;amp;name) is TRUE

MLOGIC(DRIVE): %IF condition %superq(ext) = %superq(name) is FALSE
&lt;/PRE&gt;
&lt;P&gt;the second comparison is false so the proc import is not executed. So it seems like none of the files in that folder actually have an extension exactly equal to csv. The values for NAME shown below were suspiciously like state abbreviations sc FL al az ca dc. It looks like you might have been in the comparisons with %superq comparing the stem of the file name sc instead of the extension&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc import would create the data sets in this example. Since this one didn't seem to find a CSV to import there is not data step code to find.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 00:15:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-generates-invalid-sas-name-error/m-p/432575#M68722</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-31T00:15:04Z</dc:date>
    </item>
  </channel>
</rss>

