<?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 Is there a way to change the character limit for variable names in SAS? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853087#M337209</link>
    <description>&lt;P&gt;I understand the native character limit for variable names in SAS is 32. I would like to change it to 30.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any easy way to do this?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jan 2023 16:17:14 GMT</pubDate>
    <dc:creator>awesome_opossum</dc:creator>
    <dc:date>2023-01-10T16:17:14Z</dc:date>
    <item>
      <title>Is there a way to change the character limit for variable names in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853087#M337209</link>
      <description>&lt;P&gt;I understand the native character limit for variable names in SAS is 32. I would like to change it to 30.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any easy way to do this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 16:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853087#M337209</guid>
      <dc:creator>awesome_opossum</dc:creator>
      <dc:date>2023-01-10T16:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to change the character limit for variable names in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853089#M337210</link>
      <description>&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n0vnyuzncldjabn1923ug8svx7uh.htm" target="_self"&gt;The VALIDVARNAME option&lt;/A&gt; can enforce certain pre-defined standards. As you know, the max length is 32 bytes. There isn't an option to set this to 30.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;VALIDVARNAME=V7 (the default) is 32-byte max, alphanumeric with no spaces/special chars&lt;/LI&gt;
&lt;LI&gt;VALIDVARNAME=ANY allows 32-byte max, but could have special chars/spaces using the literal notation to address them (ex 'my var name'n)&lt;/LI&gt;
&lt;LI&gt;VALIDVARNAME=V6 enforces an 8-byte max. Hello 1985: your variables are calling.&lt;/LI&gt;
&lt;LI&gt;VALIDVARNAME=UPCASE - same as V7 but enforces uppercase style.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 16:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853089#M337210</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2023-01-10T16:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to change the character limit for variable names in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853090#M337211</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/434421"&gt;@awesome_opossum&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I understand the native character limit for variable names in SAS is 32. I would like to change it to 30.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any easy way to do this?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the option VALIDVARNAME=V6 to force it to use 8 as the limit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not just run your own tests to flag any variable with a longer name.&lt;/P&gt;
&lt;P&gt;Perhaps something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table longnames as
select libname,memname,name
  from dictionary.columns
  where length(name) &amp;gt; 30
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jan 2023 16:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853090#M337211</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-10T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to change the character limit for variable names in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853094#M337215</link>
      <description>Thanks, this is a good answer.  My concern is a matter of interfacing with a database that has a 30 limit and preventing issues with exchange between systems. It seems manually checking may be the only option, then, and that is an elegant approach.</description>
      <pubDate>Tue, 10 Jan 2023 16:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853094#M337215</guid>
      <dc:creator>awesome_opossum</dc:creator>
      <dc:date>2023-01-10T16:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to change the character limit for variable names in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853095#M337216</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/434421"&gt;@awesome_opossum&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks, this is a good answer. My concern is a matter of interfacing with a database that has a 30 limit and preventing issues with exchange between systems. It seems manually checking may be the only option, then, and that is an elegant approach.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you just get in the habit of using reasonable variable names you should never come close to using names that are anywhere near 30 bytes long.&amp;nbsp; You can use the LABEL feature of SAS to attach longer descriptions of the variables.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 16:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-change-the-character-limit-for-variable-names/m-p/853095#M337216</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-10T16:48:14Z</dc:date>
    </item>
  </channel>
</rss>

