<?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: error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864007#M341233</link>
    <description>&lt;P&gt;Please go back and change your subject to something meaningful that actually describes the problem. "Error" could apply to virtually any coding post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide the ENTIRE log for the step that has the error; we do not want to see partial logs. Do not make us ask for this, provide the ENTIRE log for the step with the error, without us asking in the future.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2023 11:44:29 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-03-14T11:44:29Z</dc:date>
    <item>
      <title>ERROR: Index TEMPINDX cannot be created - index value too large</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/863998#M341231</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;My raw data set have 30,000,000 rows (30 million).&lt;/P&gt;
&lt;P&gt;I run this simple code and get error:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Index TEMPINDX cannot be created on file WORK.'SASTMP-000000417'n because the length of the index value (26448 bytes) is too 
       large. The index page size (currently 32767) must be large enough to store three index values plus a small overhead 
       structure. Reduce the length of the index value or use the IBUFSIZE= option to increase the index page size (up to a maximum 
       of 32,767 bytes).
ERROR: :Unable to create temporary index while processing summary functions.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;what is the way to solve it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want  as
select  Shop_name,
        count(distinct shop_ID) as nr_Dist
from  tbl
group by Shop_name
having  nr_Dist&amp;gt;=2
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 11:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/863998#M341231</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2023-03-14T11:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864007#M341233</link>
      <description>&lt;P&gt;Please go back and change your subject to something meaningful that actually describes the problem. "Error" could apply to virtually any coding post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide the ENTIRE log for the step that has the error; we do not want to see partial logs. Do not make us ask for this, provide the ENTIRE log for the step with the error, without us asking in the future.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 11:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864007#M341233</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-03-14T11:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Index TEMPINDX cannot be created - index value too large</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864011#M341234</link>
      <description>&lt;P&gt;Have you seen this?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/62/575.html" target="_blank"&gt;https://support.sas.com/kb/62/575.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 11:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864011#M341234</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-03-14T11:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Index TEMPINDX cannot be created - index value too large</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864023#M341238</link>
      <description>&lt;P&gt;Please show the length of variable shop_name.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 12:29:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864023#M341238</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-14T12:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Index TEMPINDX cannot be created - index value too large</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864062#M341253</link>
      <description>&lt;P&gt;So the error is saying that PROC SQL cannot use an INDEX to figure out how many distinct values of SHOP_ID there are because the LENGTH of the variable SHOP_IP is larger than one third of 32,767 (which is 10,922).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The most obvious solution is to define SHOP_ID with a length smaller than 10,922.&lt;/P&gt;
&lt;P&gt;What the heck are you going to do with SHOP_ID values longer than that anyway?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The work around if there is no way to actually reduce the length of the variable is to just count the distinct values yourself instead of asking PROC SQL to do it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=tbl(keep=shop_name shop_id) out=want nodupkey;
  by shop_name shop_id;
run;
data want;
  do nr_dist=1 by 1 until(last.shop_name);
    set want;
    by shop_name;
 end;
 if nr_dist &amp;gt; 1;
 drop shop_id;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 14:05:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864062#M341253</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-03-14T14:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Index TEMPINDX cannot be created - index value too large</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864138#M341286</link>
      <description>&lt;P&gt;Run this step on your input dataset and post the results:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data = tbl;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Mar 2023 18:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Index-TEMPINDX-cannot-be-created-index-value-too-large/m-p/864138#M341286</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-03-14T18:57:33Z</dc:date>
    </item>
  </channel>
</rss>

