<?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: sas variable names with spaces in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264540#M51909</link>
    <description>&lt;P&gt;Include the NOTAB option in your file statement and you shouldn't have a problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do, post your code.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Apr 2016 11:49:07 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-04-18T11:49:07Z</dc:date>
    <item>
      <title>sas variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264539#M51908</link>
      <description>is there a way to export sas variables to excel via dde when the variable names contain spaces? eg. put 'reporting month'n 'claim count'n. I have explored every idea using '09'x and @ and formats with the put statement but all failed.</description>
      <pubDate>Mon, 18 Apr 2016 11:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264539#M51908</guid>
      <dc:creator>reef</dc:creator>
      <dc:date>2016-04-18T11:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: sas variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264540#M51909</link>
      <description>&lt;P&gt;Include the NOTAB option in your file statement and you shouldn't have a problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do, post your code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 11:49:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264540#M51909</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-18T11:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: sas variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264543#M51910</link>
      <description>&lt;P&gt;Don't use DDE - its old (very), and not supported, plus doesn't work on some setups. &amp;nbsp;Plus you have all the limitations associated with Excel 95. &amp;nbsp;Why do you need to use it? &amp;nbsp;Proc export works ok, then there is tagsets.excelxp, which allows a lot of customisation even if it does create XML rather than a native XML XLSX file. &amp;nbsp;Then there is libname to Excel, then there is CSV, ... in fact there are so many options which are better than DDE.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 12:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264543#M51910</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-04-18T12:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: sas variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264544#M51911</link>
      <description>&lt;P&gt;Don't use blanks in variable names. Use the labels for descriptive text, and put those in your output when necessary.&lt;/P&gt;
&lt;P&gt;Blanks in identifiers (variable names, file names etc) only cause additional work, make programs less readable and serve no purpose.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 12:04:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264544#M51911</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-04-18T12:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: sas variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264545#M51912</link>
      <description>It makes no difference. The notab option is included in both the filename&lt;BR /&gt;and file.&lt;BR /&gt;&lt;BR /&gt;Filename xl dde "&amp;amp;xlfile." notab lrecl =2500;&lt;BR /&gt;Data _null_; set dat ; file xl notab; /* with or without */&lt;BR /&gt;If _n_ = 1 then put 'report month'n 'claim count'n;&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Mon, 18 Apr 2016 12:16:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264545#M51912</guid>
      <dc:creator>reef</dc:creator>
      <dc:date>2016-04-18T12:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: sas variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264549#M51913</link>
      <description>&lt;P&gt;It looks like you want to write those variable names as column headers to the Excel table. In this case the name literals don't make sense. Please try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if _n_ = 1 then put 'report month' '09'x 'claim count';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If something doesn't work, please&amp;nbsp;provide more details (log messages, the output you get, ...)&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 12:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264549#M51913</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-04-18T12:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: sas variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264552#M51914</link>
      <description>as i said previously, all ideas with '09'x, notab, @ etc were considered and all failed. there's no error in the log except that variables are not unitialised message due to spaces in variable names. here's a simple dataset for you to experiment on with the aim of writing it to excel. data d; format 'report month'n ddmmyy10.; 'report month'n = "1mar16"d; 'claim count'n = 1; output; 'report month'n = "1apr16"d; 'claim count'n = 2; output; 'report month'n = "1may16"d; 'claim count'n = 3; output; run; please note that I'm aware there are other ways to do this but I need this done using DDE.</description>
      <pubDate>Mon, 18 Apr 2016 13:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264552#M51914</guid>
      <dc:creator>reef</dc:creator>
      <dc:date>2016-04-18T13:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: sas variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264559#M51916</link>
      <description>Finally it works! a combination of notab in the fielname statement and the naming of variables as Reeza suggested ie. 'REPORTING MONTH' '09'X 'CLAIM COUNT'; Thank you all.</description>
      <pubDate>Mon, 18 Apr 2016 13:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-variable-names-with-spaces/m-p/264559#M51916</guid>
      <dc:creator>reef</dc:creator>
      <dc:date>2016-04-18T13:35:38Z</dc:date>
    </item>
  </channel>
</rss>

