<?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: CLI cursor fetch error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/977812#M378524</link>
    <description>&lt;P&gt;Yes that solution worked for me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Oct 2025 21:48:36 GMT</pubDate>
    <dc:creator>Steve_Sr_Mrkt</dc:creator>
    <dc:date>2025-10-24T21:48:36Z</dc:date>
    <item>
      <title>ERROR: CLI cursor fetch error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850396#M336093</link>
      <description>&lt;P&gt;Received&amp;nbsp;&lt;SPAN&gt;ERROR: CLI cursor fetch error ...&amp;nbsp;The requested repeat query is&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;not known to the server.&amp;nbsp; Please re-define. NOTE: The DATA step has been abnormally terminated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I run a piece of code monthly and this code has been in use for 8 years.&amp;nbsp; This month I received this error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got around the problem to finish my work by breaking the data step into 2 pieces instead of 1 single optimized code.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There was a 'Datapart' aspect of the code that seems to that may have broken very recently.&amp;nbsp; Any info would be great.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 21:44:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850396#M336093</guid>
      <dc:creator>Steve_Sr_Mrkt</dc:creator>
      <dc:date>2022-12-19T21:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850403#M336096</link>
      <description>&lt;P&gt;Posting errors without the code that caused them means there is little useful advice we can offer. I'm assuming here that this was a repeatable error, not just a one time problem. If you want some useful advice on the original code then rerun it and post the complete SAS log including any messages and errors.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 22:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850403#M336096</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-12-19T22:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850477#M336120</link>
      <description>&lt;P&gt;&lt;SPAN&gt;data contact_info_website;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;format data_dt YYMMDDN8.;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set prd.fundsupp_stg (keep=data_dt company_key website&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rename=(data_dt = data_dt_ing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;company_key = comp_key));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; length company_key 6.;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data_dt = datepart(data_dt_ing);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;drop data_dt_ing;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if data_dt &amp;gt; '31-mar-2008'd;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label comp_key = ' ';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 14:34:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850477#M336120</guid>
      <dc:creator>Steve_Sr_Mrkt</dc:creator>
      <dc:date>2022-12-20T14:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850548#M336139</link>
      <description>&lt;P&gt;So does PRD LIBREF point to an external database? I'd suggest filtering your data with a WHERE statement so it gets applied in the database rather than the IF you currently have which filters once the data is in SAS:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data contact_info_website;
&amp;nbsp;format data_dt YYMMDDN8.;
 set prd.fundsupp_stg (keep=data_dt company_key website
               rename=(data_dt = data_dt_ing
               company_key = comp_key));
        length company_key 6.;
        where data_dt_ing &amp;gt; '31Mar2008:00:00:00'dt;
        data_dt = datepart(data_dt_ing);
        drop data_dt_ing;
        label comp_key = ' ';
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Dec 2022 21:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850548#M336139</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-12-20T21:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850551#M336141</link>
      <description>&lt;P&gt;How large is the dataset being read?&amp;nbsp; How many of the observations meet the subsetting criteria?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is probably going to be faster to use WHERE to filter on the original datetime values instead of copying all of the observations and then excluding some of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why did you tell SAS to create a new empty COMPANY_KEY?&amp;nbsp; Why did you tell SAS to only store 6 of the 8 bytes needed to store the 64 bit floating point numbers that SAS uses? (Since it is going to all be missing values I guess it doesn't really matter as there will be no data that could be impacted by the lose of precision.).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am also not sure why you forced the new date variable to be the first one.&amp;nbsp; Is that important? Why?&amp;nbsp; Also why are you displaying the date in that confusing way with 8 digits without any punctuation? Why not use YYMMDD10. to display the dates so it is more obvious it is date value and not some type of number or identifier?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you going to remove the label from COMP_KEY why not also remove the label from WEBSITE?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data contact_info_website;
  set prd.fundsupp_stg (keep=data_dt company_key website);
  where date_dt &amp;gt; '31MAR2008:00:00:00'dt
  data_date = datepart(data_dt);
  format data_date YYMMDDN8.;
  drop data_dt;
  rename data_date=data_dt company_key=comp_key ;
  label company_key = ' ' website=' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Dec 2022 21:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850551#M336141</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-20T21:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850642#M336170</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your assistance, this code was written 8 years ago and just somehow worked until this month.&amp;nbsp; The dataset is not that large (213k rows), I ran the code with a changed input date to the recent month (27k rows) and it still threw the same CLI Cursor fetch error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I agree the 'where' statement would probably function better.&amp;nbsp; I did not write the code I'm just the analyst that runs it every month.&amp;nbsp; I think simply using the date structure you provided was the missing piece to make the code work as intended with minimal change.&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 16:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/850642#M336170</guid>
      <dc:creator>Steve_Sr_Mrkt</dc:creator>
      <dc:date>2022-12-21T16:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/977811#M378523</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/437816"&gt;@Steve_Sr_Mrkt&lt;/a&gt;,&amp;nbsp;Did you manage to resolve this issue? I'm experiencing the same error, but my query is against tables in Databricks.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 21:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/977811#M378523</guid>
      <dc:creator>Wanderico_Icatu</dc:creator>
      <dc:date>2025-10-24T21:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/977812#M378524</link>
      <description>&lt;P&gt;Yes that solution worked for me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 21:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-error/m-p/977812#M378524</guid>
      <dc:creator>Steve_Sr_Mrkt</dc:creator>
      <dc:date>2025-10-24T21:48:36Z</dc:date>
    </item>
  </channel>
</rss>

