<?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: The variable name   is not a valid SAS name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453573#M114636</link>
    <description>&lt;P&gt;So from now on, in every post you make, we want to see code and SASLOGs posted in the {i} or running man window. No exceptions. Every single time you should do this. Otherwise, we are going to scream.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;19 LVEF   $6
20 LVEFM $50
ERROR: The name LVEF   is not a valid SAS name.&lt;/PRE&gt;
&lt;P&gt;It's not clear to me how this happened, but it appears there are special characters in the variable name that show as spaces. Note the extra spaces after LVEF (but not after LVEFM). Also see the extra spaces after LVEF in the ERROR message.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to try retyping the LVEF and RELIF lines making sure there are no special characters in the line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Apr 2018 14:41:24 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-04-12T14:41:24Z</dc:date>
    <item>
      <title>The variable name   is not a valid SAS name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453560#M114628</link>
      <description>&lt;P&gt;I got this error when I'm importing a text data file to SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to solve it by specifying&amp;nbsp;the option&amp;nbsp;&lt;/P&gt;&lt;P&gt;options validvarname=any;&lt;/P&gt;&lt;P&gt;but I want to know why these variables' names don't&amp;nbsp;fit with SAS variables rules&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The name RELIF&amp;nbsp;&amp;nbsp; is not a valid SAS name&lt;/P&gt;&lt;P&gt;ERROR: The name LVEF&amp;nbsp;&amp;nbsp; is not a valid SAS name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 15:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453560#M114628</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-04-12T15:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: The variable name   is not a valid SAS name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453564#M114632</link>
      <description>&lt;P&gt;Can we please see the relevant parts of the SASLOG so we can see what code was submitted and what the error messages were?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 14:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453564#M114632</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-12T14:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: The variable name   is not a valid SAS name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453569#M114634</link>
      <description>&lt;P&gt;just edited it&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 14:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453569#M114634</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-04-12T14:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: The variable name   is not a valid SAS name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453572#M114635</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134228"&gt;@mona4u&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I got this error when I'm importing a text data file to SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know how to solve it by specifying&amp;nbsp;the option&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options validvarname=any;&lt;/P&gt;
&lt;P&gt;but I want to know why these variables' names don't&amp;nbsp;fit with SAS variables rules&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: The name RELIF&amp;nbsp;&amp;nbsp; is not a valid SAS name&lt;/P&gt;
&lt;P&gt;ERROR: The name LVEF&amp;nbsp;&amp;nbsp; is not a valid SAS name.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When there does not appear to be a character but the error message seems to display an extra character then one possible culprit is a null character, ASCII value 255. Please see:&lt;/P&gt;
&lt;PRE&gt;15   data junk;
16     x&amp;nbsp;=123;
ERROR: The name x&amp;nbsp; is not a valid SAS name.
17     &amp;nbsp;y=345;
ERROR: The name &amp;nbsp;y is not a valid SAS name.
18   run;

&lt;/PRE&gt;
&lt;P&gt;Notice in the second error there is an extra 'space' before the y and compared with the first error no space after y but is after x.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I typed the variable names, in Windows, alt-255 (hold the alt key and enter 255 using the numeric key pad) to add one character before or after y and x.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you might get a similar behavior if copying code from a non-text file format under some conditions.&lt;/P&gt;
&lt;P&gt;We would have to see your code to have a shot at telling if this is the case. If you post code paste it into the code box opened on the forum with the {I} as it is possible that the main message window reformats such characters.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 14:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453572#M114635</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-12T14:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: The variable name   is not a valid SAS name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453573#M114636</link>
      <description>&lt;P&gt;So from now on, in every post you make, we want to see code and SASLOGs posted in the {i} or running man window. No exceptions. Every single time you should do this. Otherwise, we are going to scream.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;19 LVEF   $6
20 LVEFM $50
ERROR: The name LVEF   is not a valid SAS name.&lt;/PRE&gt;
&lt;P&gt;It's not clear to me how this happened, but it appears there are special characters in the variable name that show as spaces. Note the extra spaces after LVEF (but not after LVEFM). Also see the extra spaces after LVEF in the ERROR message.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to try retyping the LVEF and RELIF lines making sure there are no special characters in the line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 14:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453573#M114636</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-12T14:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: The variable name   is not a valid SAS name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453617#M114648</link>
      <description>&lt;P&gt;It was minor things when I delete the variables and wrote them again it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 15:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-variable-name-is-not-a-valid-SAS-name/m-p/453617#M114648</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-04-12T15:38:40Z</dc:date>
    </item>
  </channel>
</rss>

