<?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 erro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967741#M376430</link>
    <description>&lt;P&gt;The error message seems be suggesting something in there did not understand how to translate scientific notation into numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What type of database is the CRDHRDTA libref pointing to?&lt;/P&gt;
&lt;P&gt;What engine is the _SCAMS libref using? Is it another foreign database?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note if your actual variables are using more than 16 digits of precision then trying to copy them to SAS as NUMBERS will cause loss of precision.&amp;nbsp; SAS floating point numbers cannot store that many digits precisely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 May 2025 02:23:25 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2025-05-30T02:23:25Z</dc:date>
    <item>
      <title>ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967737#M376428</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am downloading data from Server.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I download small data (&amp;lt; 450 rows), it was successful, but same command with larger number of row (&amp;gt;1000 row), it will inform error as below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am wonder if anyone in our team coped with same error and know how to solve it. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks very much if you can help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas error.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107437iB878A4DBC636F43A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas error.jpg" alt="sas error.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ERROR: CLI cursor fetch error: [DataDirect][ODBC OpenAccess SDK driver][OpenAccess SDK SQL Engine]While executing transform        assignment:Bad data in assignment for &amp;lt;destination&amp;gt;.The first 17 bytes seem ok: "8.848774444739404"but the next 4 bytes        are: "e-05"This is not valid in a decimal.To support exponents in a decimal, add the 'allow..&amp;lt;truncated&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 00:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967737#M376428</guid>
      <dc:creator>phongpham</dc:creator>
      <dc:date>2025-05-30T00:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967741#M376430</link>
      <description>&lt;P&gt;The error message seems be suggesting something in there did not understand how to translate scientific notation into numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What type of database is the CRDHRDTA libref pointing to?&lt;/P&gt;
&lt;P&gt;What engine is the _SCAMS libref using? Is it another foreign database?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note if your actual variables are using more than 16 digits of precision then trying to copy them to SAS as NUMBERS will cause loss of precision.&amp;nbsp; SAS floating point numbers cannot store that many digits precisely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 02:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967741#M376430</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-05-30T02:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967746#M376433</link>
      <description>&lt;P&gt;Looks like the ODBC driver can't handle exponential notation. That is a perfectly acceptable number if you assign it in SAS.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASKiwi_0-1748573926450.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107438i5EE3AB00A3B33429/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASKiwi_0-1748573926450.png" alt="SASKiwi_0-1748573926450.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I suspect you will have to cast the column into a format acceptable to the ODBC driver, but the first thing would be to identify which one is causing the problem. Try selecting a subset of the columns until you identify it. Also what external database are you reading?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2025 03:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967746#M376433</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-05-30T03:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967893#M376456</link>
      <description>&lt;P&gt;Thanks Tom.&lt;/P&gt;&lt;P&gt;Regarding to your questions, I would like to answer as below:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Type of database where the CRDHRDTA libref pointing to is SQL Window server.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Engine the _SCAMS libref using is SAS Viya 3.5&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Is it another foreign database -&amp;gt; I am not aware of it&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 02 Jun 2025 00:22:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967893#M376456</guid>
      <dc:creator>phongpham</dc:creator>
      <dc:date>2025-06-02T00:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967894#M376457</link>
      <description>&lt;P&gt;Thanks for your suggestion!&lt;/P&gt;
&lt;P&gt;Could you please provide more details on how to check &lt;SPAN&gt;a format acceptable to the ODBC driver.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am not familiar with this process.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Phong&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 00:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967894#M376457</guid>
      <dc:creator>phongpham</dc:creator>
      <dc:date>2025-06-02T00:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967896#M376458</link>
      <description>I identified 5 columns that responsible for the situation. If eliminate it, then download is Ok. The data base is SQL Server.</description>
      <pubDate>Mon, 02 Jun 2025 00:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967896#M376458</guid>
      <dc:creator>phongpham</dc:creator>
      <dc:date>2025-06-02T00:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967898#M376460</link>
      <description>I found the solution: just need to cast the 5 caused column as text then it will fix problem.</description>
      <pubDate>Mon, 02 Jun 2025 01:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967898#M376460</guid>
      <dc:creator>phongpham</dc:creator>
      <dc:date>2025-06-02T01:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967899#M376461</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/396024"&gt;@phongpham&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks Tom.&lt;/P&gt;
&lt;P&gt;Regarding to your questions, I would like to answer as below:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Type of database where the CRDHRDTA libref pointing to is SQL Window server.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Engine the _SCAMS libref using is SAS Viya 3.5&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Is it another foreign database -&amp;gt; I am not aware of it&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So I suspect you meant it is connecting to a Microsoft SQL Server database.&amp;nbsp; That probably does run on a Microsoft Windows Server, but it is the database itself rather than the computer it runs on that is important to know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean that _SCAMS is pointing to a CASLIB?&amp;nbsp; Or are you just using normal SAS libname statement that points to a physical disk directory which will use the native BASE SAS engine that only supports floating point numbers and fixed length character variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Foreign database just means not using native SAS libref engines, instead connecting to some other database, like Microsoft SQL Server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to look into seeing if using PROC FEDSQL instead of PROC SQL might help.&amp;nbsp; That is supposed to be able to copy between foreign databases what uses data types that the BASE SAS does not support.&amp;nbsp; So perhaps with PROC FEDSQL you could copy from your SQL Server database directly into your CASLIB file.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 02:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967899#M376461</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-06-02T02:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: CLI cursor fetch erro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967901#M376463</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/396024"&gt;@phongpham&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for your suggestion!&lt;/P&gt;
&lt;P&gt;Could you please provide more details on how to check &lt;SPAN&gt;a format acceptable to the ODBC driver.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am not familiar with this process.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Phong&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is probably more important to know the TYPE of the variables involved.&amp;nbsp; You should be able to use the ODBC::SQLColumns() function in pass-thru SQL to find the names and data types of the variables in the dataset (or "columns" in the "table") that you are trying to extract.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_063/acreldb/p1f29m86u65hken1deqcybowtgma.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_063/acreldb/p1f29m86u65hken1deqcybowtgma.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the variable is a LONGINT or DECIMAL with too large a precision it will not be able to transfer it as a number into a SAS dataset.&amp;nbsp; Casting it as CHAR is one way to allow the data to transfer.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 03:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-CLI-cursor-fetch-erro/m-p/967901#M376463</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-06-02T03:01:40Z</dc:date>
    </item>
  </channel>
</rss>

