<?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 To solve the error message in the log in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875814#M38854</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I ran the code I got error message in log, what does it mean by variable contains more than 32 bytes. Any solutions are highly appreciated. Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data project2;&lt;BR /&gt;set project1;&lt;BR /&gt;state_marijuana_legal_status1=state_marijuana_legal_status; &lt;BR /&gt;if followUp=2 and date_recreational_marijuana_legalized &amp;gt; "01JUL2020"d then state_marijuana_legal_status1=1;&lt;BR /&gt;if followUp=5 and date_recreational_marijuana_legalized &amp;gt; "01DEC2020"d then state_marijuana_legal_status1=1;&lt;BR /&gt;if followUp=7 and date_recreational_marijuana_legalized &amp;gt; "01MAY2021"d then state_marijuana_legal_status1=1;&lt;BR /&gt;if followUp=8 and date_recreational_marijuana_legalized &amp;gt; "01SEP2021"d then state_marijuana_legal_status1=1;&lt;BR /&gt;if followUp=10 and date_recreational_marijuana_legalized &amp;gt; "01MAR2022"d then state_marijuana_legal_status1=1;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;I got this error message in my log:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;68&lt;/DIV&gt;&lt;DIV class=""&gt;69 data project2;&lt;/DIV&gt;&lt;DIV class=""&gt;70 set project1;&lt;/DIV&gt;&lt;DIV class=""&gt;71 state_marijuana_legal_status1=state_marijuana_legal_status;&lt;/DIV&gt;&lt;DIV class=""&gt;72 if followUp=2 and date_recreational_marijuana_legalized &amp;gt; "01JUL2020"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;73 if followUp=5 and date_recreational_marijuana_legalized &amp;gt; "01DEC2020"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;74 if followUp=7 and date_recreational_marijuana_legalized &amp;gt; "01MAY2021"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;75 if followUp=8 and date_recreational_marijuana_legalized &amp;gt; "01SEP2021"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;76 if followUp=10 and date_recreational_marijuana_legalized &amp;gt; "01MAR2022"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;77 run;&lt;/DIV&gt;</description>
    <pubDate>Mon, 15 May 2023 13:47:07 GMT</pubDate>
    <dc:creator>Dawa93</dc:creator>
    <dc:date>2023-05-15T13:47:07Z</dc:date>
    <item>
      <title>To solve the error message in the log</title>
      <link>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875814#M38854</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I ran the code I got error message in log, what does it mean by variable contains more than 32 bytes. Any solutions are highly appreciated. Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data project2;&lt;BR /&gt;set project1;&lt;BR /&gt;state_marijuana_legal_status1=state_marijuana_legal_status; &lt;BR /&gt;if followUp=2 and date_recreational_marijuana_legalized &amp;gt; "01JUL2020"d then state_marijuana_legal_status1=1;&lt;BR /&gt;if followUp=5 and date_recreational_marijuana_legalized &amp;gt; "01DEC2020"d then state_marijuana_legal_status1=1;&lt;BR /&gt;if followUp=7 and date_recreational_marijuana_legalized &amp;gt; "01MAY2021"d then state_marijuana_legal_status1=1;&lt;BR /&gt;if followUp=8 and date_recreational_marijuana_legalized &amp;gt; "01SEP2021"d then state_marijuana_legal_status1=1;&lt;BR /&gt;if followUp=10 and date_recreational_marijuana_legalized &amp;gt; "01MAR2022"d then state_marijuana_legal_status1=1;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;I got this error message in my log:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;68&lt;/DIV&gt;&lt;DIV class=""&gt;69 data project2;&lt;/DIV&gt;&lt;DIV class=""&gt;70 set project1;&lt;/DIV&gt;&lt;DIV class=""&gt;71 state_marijuana_legal_status1=state_marijuana_legal_status;&lt;/DIV&gt;&lt;DIV class=""&gt;72 if followUp=2 and date_recreational_marijuana_legalized &amp;gt; "01JUL2020"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;73 if followUp=5 and date_recreational_marijuana_legalized &amp;gt; "01DEC2020"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;74 if followUp=7 and date_recreational_marijuana_legalized &amp;gt; "01MAY2021"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;75 if followUp=8 and date_recreational_marijuana_legalized &amp;gt; "01SEP2021"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;76 if followUp=10 and date_recreational_marijuana_legalized &amp;gt; "01MAR2022"d then state_marijuana_legal_status1=1;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.&lt;/DIV&gt;&lt;DIV class=""&gt;77 run;&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 May 2023 13:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875814#M38854</guid>
      <dc:creator>Dawa93</dc:creator>
      <dc:date>2023-05-15T13:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: To solve the error message in the log</title>
      <link>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875815#M38855</link>
      <description>&lt;P&gt;The variable name in your code,&amp;nbsp;date_recreational_marijuana_legalized, is longer than 32 characters.&amp;nbsp; This is not allowed in SAS datasets, therefore this variable cannot exist in work.project1.&amp;nbsp; Suggest running PROC CONTENTS on work.project1 to check the variable name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This (poorly worded) error message is about the variable name, not data in the variable.&amp;nbsp; You can generate it with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1    data _null_ ;
2      date_recreational_marijuana_legalized=1 ;
ERROR: The variable named date_recreational_marijuana_legalized contains more than 32 bytes.
3    run ;

NOTE: The SAS System stopped processing this step because of errors.
&lt;/PRE&gt;
&lt;P&gt;I think maybe the error message is intended to be "ERROR: The variable name&amp;nbsp;date_recreational_marijuana_legalized contains more than 32 bytes."&amp;nbsp; So &lt;EM&gt;name&lt;/EM&gt;, not &lt;EM&gt;named&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 13:56:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875815#M38855</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-05-15T13:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: To solve the error message in the log</title>
      <link>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875816#M38856</link>
      <description>&lt;P&gt;The names of variables in SAS is limited to 32 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are attempting to use/create variables with names longer than that. Since SAS won't let you create such then you need to check your data set to check the actual spelling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shorten the name of the variable to the 32 or fewer characters actually in the set Project1. If you don't actually know the names then run:&lt;/P&gt;
&lt;PRE&gt;Proc contents data=project1;
run;&lt;/PRE&gt;
&lt;P&gt;to show the names and properties of the variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally the number of variables that I create with names longer than 16 characters are few and far between as I am too lazy to type that stuff hundreds of times.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 13:56:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875816#M38856</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-05-15T13:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: To solve the error message in the log</title>
      <link>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875823#M38857</link>
      <description>Thank you!! It worked after shortening the name of the variable.</description>
      <pubDate>Mon, 15 May 2023 14:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875823#M38857</guid>
      <dc:creator>Dawa93</dc:creator>
      <dc:date>2023-05-15T14:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: To solve the error message in the log</title>
      <link>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875824#M38858</link>
      <description>Thank you!! It worked after shortening the name of variable.</description>
      <pubDate>Mon, 15 May 2023 14:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/To-solve-the-error-message-in-the-log/m-p/875824#M38858</guid>
      <dc:creator>Dawa93</dc:creator>
      <dc:date>2023-05-15T14:13:47Z</dc:date>
    </item>
  </channel>
</rss>

