<?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 How do I quote the darned thing? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114247#M23527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a spreadsheet name with spaces in it.&amp;nbsp; I have placed this value into a macro variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let standardsheet=%str(SDTM Terminology 2013-04-13$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to use this in a proc import.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.newterm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "SDTM Terminology.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; range="&amp;amp;standardsheet";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pretty consistently, I get something along the lines of&lt;/P&gt;&lt;P&gt;ERROR: File _IMEX_.'SDTM Terminology 2013-04-13$'n.DATA does not exist.&lt;/P&gt;&lt;P&gt;ERROR: Import unsuccessful.&amp;nbsp; See SAS Log for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using various sets of quotes and using various macro quoting functions in my %let and I still can't get it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The spreadsheet does exist.&amp;nbsp; The wizard proc import code is&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "SDTM Terminology.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANGE="'SDTM Terminology 2013-04-12$'";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please save my sanity!&amp;nbsp; I'm missing the very obvious.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Apr 2013 20:10:37 GMT</pubDate>
    <dc:creator>SusanParker</dc:creator>
    <dc:date>2013-04-19T20:10:37Z</dc:date>
    <item>
      <title>How do I quote the darned thing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114247#M23527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a spreadsheet name with spaces in it.&amp;nbsp; I have placed this value into a macro variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let standardsheet=%str(SDTM Terminology 2013-04-13$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to use this in a proc import.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.newterm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "SDTM Terminology.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; range="&amp;amp;standardsheet";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pretty consistently, I get something along the lines of&lt;/P&gt;&lt;P&gt;ERROR: File _IMEX_.'SDTM Terminology 2013-04-13$'n.DATA does not exist.&lt;/P&gt;&lt;P&gt;ERROR: Import unsuccessful.&amp;nbsp; See SAS Log for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using various sets of quotes and using various macro quoting functions in my %let and I still can't get it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The spreadsheet does exist.&amp;nbsp; The wizard proc import code is&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "SDTM Terminology.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=EXCEL REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RANGE="'SDTM Terminology 2013-04-12$'";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MIXED=NO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please save my sanity!&amp;nbsp; I'm missing the very obvious.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 20:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114247#M23527</guid>
      <dc:creator>SusanParker</dc:creator>
      <dc:date>2013-04-19T20:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I quote the darned thing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114248#M23528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The import code from the wizard has 3 quotes, one single and one double I believe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think it matters if you nest them the other way though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 20:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114248#M23528</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-04-19T20:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I quote the darned thing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114249#M23529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code you said worked looks like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;&amp;nbsp; RANGE="'SDTM Terminology 2013-04-12$'";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;So you would set your macro variable to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;%let standardsheet = &lt;SPAN style="background-color: #ffffff;"&gt;SDTM Terminology 2013-04-12$ ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;And then reference like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp; RANGE="'&amp;amp;standardsheet'";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;You might be able to remove the &lt;SPAN style="font-family: 'courier new', courier;"&gt;$&lt;/SPAN&gt; from the macro variable and add it to the reference like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp; RANGE="'&amp;amp;standardsheet$'";&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 20:51:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114249#M23529</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-19T20:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I quote the darned thing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114250#M23530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It actually does matter if you nest them the other way.&amp;nbsp; The error message changes, but it still doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 21:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114250#M23530</guid>
      <dc:creator>SusanParker</dc:creator>
      <dc:date>2013-04-19T21:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I quote the darned thing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114251#M23531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried just about every combination of quotes I could think of both in and out of the macro variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a situation where if you haven't run the code and verified that it works, assume I've tried it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not tried combinations of quoting functions together, although I'm not sure that would gain me anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 21:24:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114251#M23531</guid>
      <dc:creator>SusanParker</dc:creator>
      <dc:date>2013-04-19T21:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I quote the darned thing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114252#M23532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the correct answer is to have the macro variable have the correct value to start with.&amp;nbsp; I knew it had to be something staring me right in the face.&amp;nbsp; Sorry for taking up people's time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let standardsheet=%str('SDTM Terminology 2013-04-12');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it works just fine. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 21:31:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114252#M23532</guid>
      <dc:creator>SusanParker</dc:creator>
      <dc:date>2013-04-19T21:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I quote the darned thing?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114253#M23533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Macro quoting is not needed if you have already surrounded the value with quotes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 22:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-quote-the-darned-thing/m-p/114253#M23533</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-04-19T22:15:00Z</dc:date>
    </item>
  </channel>
</rss>

