<?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: Variable that start with numbers workaround help in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505625#M1192</link>
    <description>&lt;P&gt;You need to use the n literal notation, quotes and an N after the quotes to indicate this is a name literal and refers to either a variable or data set name. SAS does not allow varialbes to be named with numbers at the start (common in programming languages) and then you need to use this type of notation to get around that limitation. In general, I recommend renaming the variables to Total2017_65_80P. Prefixes are definitely more supported in SAS than suffixes.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Keep States '2013_Total_65_80'n;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you set the validvarname=V9 it will automatically rename variables when you import them, usually by adding an underscore at the start.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/241246"&gt;@Essen5605&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a large data set&amp;nbsp; with a bunch of variables that start with example&amp;nbsp; 2017_Total_65_80P.&amp;nbsp;I am trying to find a way how to use the variable to perform manipulations by not changing the variable name to something like&amp;nbsp;Total_65_80P_2017 since SAS prefers text followed by digit.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;24&lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 data work.CPS_CENSUS_65Plus;&lt;BR /&gt;27 set MYLIB.CPS_CENSUS;&lt;BR /&gt;28 keep States '2013_Total_65_80';&lt;BR /&gt;__________________&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, -, :, ;, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2018 15:57:36 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-10-18T15:57:36Z</dc:date>
    <item>
      <title>Variable that start with numbers workaround help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505620#M1190</link>
      <description>&lt;P&gt;I have a large data set&amp;nbsp; with a bunch of variables that start with example&amp;nbsp; 2017_Total_65_80P.&amp;nbsp;I am trying to find a way how to use the variable to perform manipulations by not changing the variable name to something like&amp;nbsp;Total_65_80P_2017 since SAS prefers text followed by digit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;24&lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 data work.CPS_CENSUS_65Plus;&lt;BR /&gt;27 set MYLIB.CPS_CENSUS;&lt;BR /&gt;28 keep States '2013_Total_65_80';&lt;BR /&gt;__________________&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, -, :, ;, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_.&lt;/P&gt;&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 15:53:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505620#M1190</guid>
      <dc:creator>Essen5605</dc:creator>
      <dc:date>2018-10-18T15:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Variable that start with numbers workaround help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505625#M1192</link>
      <description>&lt;P&gt;You need to use the n literal notation, quotes and an N after the quotes to indicate this is a name literal and refers to either a variable or data set name. SAS does not allow varialbes to be named with numbers at the start (common in programming languages) and then you need to use this type of notation to get around that limitation. In general, I recommend renaming the variables to Total2017_65_80P. Prefixes are definitely more supported in SAS than suffixes.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Keep States '2013_Total_65_80'n;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you set the validvarname=V9 it will automatically rename variables when you import them, usually by adding an underscore at the start.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/241246"&gt;@Essen5605&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a large data set&amp;nbsp; with a bunch of variables that start with example&amp;nbsp; 2017_Total_65_80P.&amp;nbsp;I am trying to find a way how to use the variable to perform manipulations by not changing the variable name to something like&amp;nbsp;Total_65_80P_2017 since SAS prefers text followed by digit.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;24&lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 data work.CPS_CENSUS_65Plus;&lt;BR /&gt;27 set MYLIB.CPS_CENSUS;&lt;BR /&gt;28 keep States '2013_Total_65_80';&lt;BR /&gt;__________________&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, -, :, ;, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 15:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505625#M1192</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-18T15:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Variable that start with numbers workaround help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505629#M1193</link>
      <description>&lt;P&gt;Thanks !&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 16:00:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505629#M1193</guid>
      <dc:creator>Essen5605</dc:creator>
      <dc:date>2018-10-18T16:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Variable that start with numbers workaround help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505636#M1195</link>
      <description>&lt;P&gt;In addition to using the &lt;FONT face="courier new,courier"&gt;'...'n&lt;/FONT&gt; syntax, you'll need to set&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Oct 2018 16:09:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Variable-that-start-with-numbers-workaround-help/m-p/505636#M1195</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-10-18T16:09:51Z</dc:date>
    </item>
  </channel>
</rss>

