<?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: How many characters can be used in a label?     256 or 32767 ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704584#M216005</link>
    <description>&lt;P&gt;I, too, prefer the doc, but you can also write a program to experiment/validate. Here is a program that makes a string of length N and puts it into a macro variable (which also has a maximum length). If you use this value in the LABEL statement to set a variable label, you can see whether it works for 257 length:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let N = 257;
data _NULL_;
length L $&amp;amp;N;
L = subpad("A",1,257);
call symput("lbl", L);
run;

data Want;
label A = "&amp;amp;lbl";
a = 1;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For this program, you get the following WARNING:&lt;/P&gt;
&lt;P&gt;WARNING: Label value for variable A has been truncated to a length of 256&lt;BR /&gt;bytes.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Dec 2020 22:52:44 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2020-12-08T22:52:44Z</dc:date>
    <item>
      <title>How many characters can be used in a label?     256 or 32767 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704487#M215970</link>
      <description>&lt;P&gt;How many characters can be used in a label?&lt;BR /&gt;a. 96&lt;BR /&gt;b. 200&lt;BR /&gt;c. 256&lt;BR /&gt;d. 32,767&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sas prep guide answer is&amp;nbsp; 32,767,&amp;nbsp;&lt;/P&gt;&lt;P&gt;but everywhere i searched l it is 256&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 18:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704487#M215970</guid>
      <dc:creator>vidyapedii</dc:creator>
      <dc:date>2020-12-08T18:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: How many characters can be used in a label?     256 or 32767 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704490#M215972</link>
      <description>&lt;P&gt;The documentation for the LABEL statement is very clear.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lestmtsref&amp;amp;docsetTarget=n1r8ub0jx34xfsn1ppcjfe0u16pc.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lestmtsref&amp;amp;docsetTarget=n1r8ub0jx34xfsn1ppcjfe0u16pc.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 18:11:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704490#M215972</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-08T18:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: How many characters can be used in a label?     256 or 32767 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704495#M215974</link>
      <description>Which prep guide and what version? Did you check the errata page for an issue?&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Dec 2020 18:14:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704495#M215974</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-08T18:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: How many characters can be used in a label?     256 or 32767 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704502#M215978</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/129883"&gt;@vidyapedii&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the context of the question is relevant: If "label" means a &lt;EM&gt;formatted value&lt;/EM&gt; in a format definition, then 32,767 is correct, whereas a &lt;EM&gt;variable&lt;/EM&gt; label and a &lt;EM&gt;data set&lt;/EM&gt; label have a maximum length of 256. (In the context of graphics there are axis labels, tick mark labels, ...)&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 18:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704502#M215978</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-12-08T18:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: How many characters can be used in a label?     256 or 32767 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704505#M215981</link>
      <description>&lt;P&gt;So,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/129883"&gt;@vidyapedii&lt;/a&gt;, following up on the point by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;, what is the exact wording of the question?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 18:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704505#M215981</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-08T18:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: How many characters can be used in a label?     256 or 32767 ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704584#M216005</link>
      <description>&lt;P&gt;I, too, prefer the doc, but you can also write a program to experiment/validate. Here is a program that makes a string of length N and puts it into a macro variable (which also has a maximum length). If you use this value in the LABEL statement to set a variable label, you can see whether it works for 257 length:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let N = 257;
data _NULL_;
length L $&amp;amp;N;
L = subpad("A",1,257);
call symput("lbl", L);
run;

data Want;
label A = "&amp;amp;lbl";
a = 1;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For this program, you get the following WARNING:&lt;/P&gt;
&lt;P&gt;WARNING: Label value for variable A has been truncated to a length of 256&lt;BR /&gt;bytes.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 22:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-many-characters-can-be-used-in-a-label-256-or-32767/m-p/704584#M216005</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-12-08T22:52:44Z</dc:date>
    </item>
  </channel>
</rss>

