<?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: Hash data set load failed   ERROR: Hash object added 0 items when memory failure in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898760#M11124</link>
    <description>if. First will not be correct as the account will be always flagged every month after first month account meet the flagging rule.</description>
    <pubDate>Mon, 16 Oct 2023 12:12:58 GMT</pubDate>
    <dc:creator>Ahmedellaithy</dc:creator>
    <dc:date>2023-10-16T12:12:58Z</dc:date>
    <item>
      <title>Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898738#M11116</link>
      <description>&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;I have data set named as have contain 3 variables and 1048579 rows and I am trying to run the following code but allows get the following errors :&lt;/P&gt;&lt;DIV class=""&gt;ERROR: Hash data set load failed at line 85 column 4.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: Hash object added 0 items when memory failure occurred.&lt;/DIV&gt;&lt;DIV class=""&gt;FATAL: Insufficient memory to execute DATA step program. Aborted during the EXECUTION phase.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: The SAS System stopped processing this step because of insufficient memory.&lt;/DIV&gt;&lt;DIV class=""&gt;code:&lt;/DIV&gt;&lt;DIV class=""&gt;proc sort data=have;&lt;BR /&gt;by acct_id date;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data answers(drop=_: dpd);&lt;BR /&gt;set have;&lt;BR /&gt;by acct_id date;&lt;BR /&gt;retain FWD12mont_default_flg '0' default_Exclusion '0';&lt;BR /&gt;&lt;BR /&gt;/* populate bqr1 to bqr12 and current and FWD default_flg */&lt;BR /&gt;if acct_id &amp;gt;= 1 then do;&lt;BR /&gt;&lt;BR /&gt;dcl hash h1(dataset:cats('have (where=(acct_id="', acct_id, '"))'),&lt;BR /&gt;ordered:'y');&lt;BR /&gt;h1.defineKey('acct_id', 'date');&lt;BR /&gt;h1.defineData('dpd');&lt;BR /&gt;h1.defineDone();&lt;BR /&gt;declare hiter hh1 ('h1');&lt;BR /&gt;FWD12mont_default_flg='0';&lt;BR /&gt;end;&lt;BR /&gt;array _arr_bqr(*) $1 dpd1-dpd13;&lt;BR /&gt;call missing(of _arr_bqr(*));&lt;BR /&gt;_rc=hh1.setcur(key:acct_id, key:date);&lt;BR /&gt;&lt;BR /&gt;do _i=1 to 13 while (_rc=0);&lt;BR /&gt;_arr_bqr[_i]=dpd;&lt;BR /&gt;&lt;BR /&gt;if dpd='9' then&lt;BR /&gt;FWD12mont_default_flg='1';&lt;BR /&gt;_rc=hh1.next();&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;if last.acct_id then&lt;BR /&gt;h1.delete();&lt;BR /&gt;&lt;BR /&gt;/* populate bqr1 to bqr12 and current and BKW default_Exclusion */&lt;BR /&gt;if acct_id &amp;gt;= 1 then do;&lt;BR /&gt;&lt;BR /&gt;dcl hash h11(dataset:cats('have (where=(acct_id="', acct_id, '"))'),&lt;BR /&gt;ordered:'descending');&lt;BR /&gt;h11.defineKey('acct_id', 'date');&lt;BR /&gt;h11.defineData('dpd');&lt;BR /&gt;h11.defineDone();&lt;BR /&gt;declare hiter hh11 ('h11');&lt;BR /&gt;default_Exclusion='0';&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;/* populate bqr1 to bqr12 and default_flg */&lt;BR /&gt;array _arr_Hbqr(*) $1 BKW_dpd1-BKW_dpd13;&lt;BR /&gt;call missing(of _arr_Hbqr(*));&lt;BR /&gt;_rc=hh11.setcur(key:acct_id, key:date);&lt;BR /&gt;&lt;BR /&gt;do _i=1 to 13 while (_rc=0);&lt;BR /&gt;_arr_Hbqr[_i]=dpd;&lt;BR /&gt;if dpd='9' then&lt;BR /&gt;default_Exclusion='1';&lt;BR /&gt;_rc=hh11.next();&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if last.acct_id then&lt;BR /&gt;h11.delete();&lt;BR /&gt;run;&lt;/DIV&gt;&lt;PRE class=""&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 11:23:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898738#M11116</guid>
      <dc:creator>Ahmedellaithy</dc:creator>
      <dc:date>2023-10-16T11:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898742#M11117</link>
      <description>&lt;P&gt;The log explains what the problem is. You run out of memory, which gives an error and stops the data step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect that the real question here is how to accomplish whatever you try to accomplish without the Data Step giving an error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is the case, please provide a minimum of sample data and explain what the code above is suppose to do and the desired result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 11:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898742#M11117</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2023-10-16T11:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898743#M11118</link>
      <description>&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data have;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;input date:anydtdte. acct_id:$16. BQR:$1.;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;format date date9.;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;datalines;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;30-Sep-17 1 0&lt;/DIV&gt;&lt;DIV&gt;30-Oct-17&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;29-Nov-17&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;29-Dec-17&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;28-Jan-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;27-Feb-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;29-Mar-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;28-Apr-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;28-May-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;27-Jun-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;27-Jul-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;26-Aug-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;25-Sep-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;25-Oct-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;24-Nov-18&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;24-Dec-18&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;23-Jan-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;22-Feb-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;24-Mar-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;23-Apr-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;23-May-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;22-Jun-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;22-Jul-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;21-Aug-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;20-Sep-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;20-Oct-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;19-Nov-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;19-Dec-19&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;18-Jan-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;17-Feb-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;18-Mar-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;17-Apr-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;17-May-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;16-Jun-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;16-Jul-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;15-Aug-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;14-Sep-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;14-Oct-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;13-Nov-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;;run;&lt;/DIV&gt;&lt;DIV&gt;the above is example of the data that I have and I need to look for 12 months forward and backward based on each observation date and in case the account dpd equal to 9 then to update two flags one in case this happed in the Forward looking and another in case this happed in the backward looking&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;13-Dec-20&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;12-Jan-21&amp;nbsp; 1 0&lt;/DIV&gt;&lt;DIV&gt;11-Feb-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;13-Mar-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;12-Apr-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;12-May-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;11-Jun-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;11-Jul-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;10-Aug-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;09-Sep-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;09-Oct-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;08-Nov-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;08-Dec-21&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;07-Jan-22&amp;nbsp; 1 9&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Oct 2023 11:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898743#M11118</guid>
      <dc:creator>Ahmedellaithy</dc:creator>
      <dc:date>2023-10-16T11:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898744#M11119</link>
      <description>I was trying to do that using hash option</description>
      <pubDate>Mon, 16 Oct 2023 11:44:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898744#M11119</guid>
      <dc:creator>Ahmedellaithy</dc:creator>
      <dc:date>2023-10-16T11:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898745#M11120</link>
      <description>Is there is any way to optimize my code to overcome the memory issue noting I am using sas studio&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Oct 2023 11:47:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898745#M11120</guid>
      <dc:creator>Ahmedellaithy</dc:creator>
      <dc:date>2023-10-16T11:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898753#M11121</link>
      <description>&lt;P&gt;You are probably creating a lot more hash objects than you delete.&amp;nbsp; In particular, you have:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  if acct_id &amp;gt;= 1 then do;
    dcl hash h1(dataset:cats('have (where=(acct_id="', acct_id, '"))'),ordered:'y');
      h1.defineKey('acct_id', 'date');
      h1.defineData('dpd');
      h1.defineDone();
    declare hiter hh1 ('h1');
    FWD12mont_default_flg='0';
  end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  if acct_id &amp;gt;= 1 then do;
    dcl hash h11(dataset:cats('have (where=(acct_id="', acct_id, '"))'),ordered:'descending');
      h11.defineKey('acct_id', 'date');
      h11.defineData('dpd');
      h11.defineDone();
    declare hiter hh11 ('h11');
    default_Exclusion='0';
  end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;which creates an H1 and H11 hash object for every observation with an acct_id&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;1.&amp;nbsp; When you create a new hash object having the same name as an existing hash object, the memory used by the old object is not released, and its content is no longer accessible.&amp;nbsp; So you should delete before redeclaring.&amp;nbsp; Or better yet, just use the CLEAR method, then re-use without declaring a new identically named hash object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Back to your error message" your removal of these hash objects from memory are done via&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  if last.acct_id then h1.delete();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if last.acct_id then h11.delete();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So if you have multiple observations per acct_id (suggested by your use of &lt;FONT face="helvetica"&gt;&lt;STRONG&gt;set have;&amp;nbsp;by acct_id date;&lt;/STRONG&gt;&lt;/FONT&gt;), you are not doing proper housekeeping.&amp;nbsp; &amp;nbsp; You are constantly increasing memory demands for hash objects to hold content that you can no longer access.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 12:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898753#M11121</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2023-10-16T12:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898756#M11122</link>
      <description>&lt;P&gt;You constantly re-declare the hash object(s), but delete them only when last.acct_id is true. This keeps the old objects in memory.&lt;/P&gt;
&lt;P&gt;Instead of re-declaring the objects, declare them once at _n_ = 1, and use the CLEAR method to re-initialize them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect you should use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if first.acct_id&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;instead of&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if acct_id &amp;gt;= 1&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since acct_id is character in your dataset, you should also use a character literal in the comparison, if you really want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if acct_id &amp;gt;= "1"&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Oct 2023 12:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898756#M11122</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-16T12:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898757#M11123</link>
      <description>&lt;P&gt;Hi Thank you for feedback but I am doing two hash using same info but one is sorted ascending and the other is descending.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you let me know how to use the clear option that you mentioned .&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 12:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898757#M11123</guid>
      <dc:creator>Ahmedellaithy</dc:creator>
      <dc:date>2023-10-16T12:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898760#M11124</link>
      <description>if. First will not be correct as the account will be always flagged every month after first month account meet the flagging rule.</description>
      <pubDate>Mon, 16 Oct 2023 12:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898760#M11124</guid>
      <dc:creator>Ahmedellaithy</dc:creator>
      <dc:date>2023-10-16T12:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898762#M11125</link>
      <description>&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lecompobjref/n1r4uyzvpsg09qn1e5h8nqbzammi.htm" target="_blank" rel="noopener"&gt;CLEAR Method&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 12:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898762#M11125</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-16T12:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898766#M11126</link>
      <description>&lt;P&gt;If you DELETE the hash at last.acct_id, then you&amp;nbsp;&lt;U&gt;must&lt;/U&gt; DECLARE it at first.acct_id.&lt;/P&gt;
&lt;P&gt;These actions have to be synchronized.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But from your code, I guess hash objects are not what you are looking for.&lt;/P&gt;
&lt;P&gt;Use a double DO loop and a date-indexed array. In the first DO, read all observations into the array.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array dpds {'01jan1900'd:'31dec2099'd} temporary;
do i = '01jan1900'd tom'31dec2099'd;
  dpds{i} = .;
end;
do until (last.acct_id);
  set have;
  by acct_id;
  dpds{date} = dpd;
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then, in the second DO loop, re-read the observations, set the flags, and OUTPUT.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;do until (last.acct_id);
  set have;
  by acct_id;
  do i = intnx('month',date,-13) to date;
    if dpds{i} = 9 then flag1 = 1;
  end;
  output;
end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Oct 2023 12:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/898766#M11126</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-16T12:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/901286#M11152</link>
      <description>&lt;P&gt;Note that you need to give the ARRAY statement actual integer values for the bounds. And include the _'s in _temporary_.&lt;/P&gt;
&lt;PRE&gt;1    data test;
2      array dpds {'01jan1900'd:'31dec2099'd} temporary;
                   ------------
                   22
                   200
ERROR 22-322: Syntax error, expecting one of the following: an integer constant, *.

ERROR 200-322: The symbol is not recognized and will be ignored.

3    run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST may be incomplete.  When this step was stopped there were 0 observations and 1 variables.
WARNING: Data set WORK.TEST was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


4    data test;
5      array dpds {%sysevalf('01jan1900'd) :%sysevalf('31dec2099'd)} temporary;
ERROR: Too few variables defined for the dimension(s) specified for the array dpds.
6    run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.TEST was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


7    data test;
8      array dpds {%sysevalf('01jan1900'd) :%sysevalf('31dec2099'd)} _temporary_;
9    run;

NOTE: The data set WORK.TEST has 1 observations and 0 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 18:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/901286#M11152</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-02T18:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hash data set load failed   ERROR: Hash object added 0 items when memory failure</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/901474#M11157</link>
      <description>&lt;P&gt;I would recommend a minor tweak to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;'s suggestion for using date values as array bounds.&amp;nbsp; Instead of&lt;/P&gt;
&lt;PRE&gt;7    data test;
8      array dpds {%sysevalf('01jan1900'd) :%sysevalf('31dec2099'd)} _temporary_;
9    run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you could use double quotes instead of single quotes.&amp;nbsp; Unlike the single quotes, the double quotes will allow the macro interpreter to examine the quoted value.&amp;nbsp; If the quoted value is literal text as above, there is no difference (assuming you don't have nested quotes).&amp;nbsp; But if the quoted value is a macro variable or expression, you can use macro assignments that become usable in the array statement, as in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let date1=01jan1900;
%let date2=31dec2099;

data test;
  array dpds {%sysevalf("&amp;amp;date1"d) :%sysevalf("&amp;amp;date2"d)} _temporary_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Nov 2023 19:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Hash-data-set-load-failed-ERROR-Hash-object-added-0-items-when/m-p/901474#M11157</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2023-11-03T19:32:30Z</dc:date>
    </item>
  </channel>
</rss>

