<?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: Function sequence error (SAS Federation Server) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Function-sequence-error-SAS-Federation-Server/m-p/952125#M372137</link>
    <description>&lt;P&gt;I apologise, my mistake. The problem was that I used functions incorrectly.&lt;BR /&gt;To make my code work, you need to add additional lines:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc ds2;
data _NULL_;
  method run();
    dcl int output_var;
    dcl package sqlstmt s('SELECT 1 FROM CDM.RTDMCDM1.CI_CAMPAIGN');&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;    s.execute();&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;    s.fetch();&lt;/STRONG&gt;&lt;/FONT&gt;
    output_var = s.getInt(1);
  end;
enddata;
run;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Nov 2024 11:22:45 GMT</pubDate>
    <dc:creator>John_Wick</dc:creator>
    <dc:date>2024-11-28T11:22:45Z</dc:date>
    <item>
      <title>Function sequence error (SAS Federation Server)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-sequence-error-SAS-Federation-Server/m-p/951831#M372059</link>
      <description>&lt;P&gt;Hello, experts&lt;/P&gt;
&lt;P&gt;When I try to make a simple query select and put the result into a variable on Federation Server using DS2 code, I get the following error&lt;/P&gt;
&lt;P&gt;EG log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;P&gt;ERROR: Function sequence error&lt;/P&gt;
&lt;P&gt;ERROR: GETINTEGER for column 1 failed on result set of SQL Statement: select 1 from CDM.RTDMCDM1.CI_CAMPAIGN&lt;/P&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;Federation server log:&lt;/P&gt;
&lt;LI-SPOILER&gt;2024-11-25T20:44:33,825 TRACE [00028094] App.Statement.Statement.GetDiagRecs 458:sasdmadm@saspw - IOM RETURN&lt;BR /&gt;0={compRef:7f0166c5e800}-&amp;gt;Statement::GetDiagRecs():&lt;BR /&gt;sqlStates=[0…1]&lt;BR /&gt;[0]=HY000&lt;BR /&gt;[1]=HY010&lt;BR /&gt;nativeerror=[0.1]&lt;BR /&gt;[0]=-2038444017 [1]=-2130708356&lt;BR /&gt;message text=[0.1]&lt;BR /&gt;[[0]=GETINTEGER for column 1 failed on result set of SQL statement: select 1 as output_var from CDM.RTDMCDM1.CI_CAMPAIGN&lt;BR /&gt;[1]=Function sequence error&lt;BR /&gt;status=[0…1]&lt;BR /&gt;[0]=0 [1]=0&lt;/LI-SPOILER&gt;
&lt;P&gt;The code looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc ds2;
data _NULL_;
  method run();
    dcl int output_var;
    dcl package sqlstmt s('SELECT 1 FROM CDM.RTDMCDM1.CI_CAMPAIGN');
    output_var = s.getInt(1);
  end;
enddata;
run;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you tell me what this error might be related to?&lt;/P&gt;
&lt;P&gt;This problem is observed with functions like getInt, getchar, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2024 18:45:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-sequence-error-SAS-Federation-Server/m-p/951831#M372059</guid>
      <dc:creator>John_Wick</dc:creator>
      <dc:date>2024-11-25T18:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Function sequence error (SAS Federation Server)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Function-sequence-error-SAS-Federation-Server/m-p/952125#M372137</link>
      <description>&lt;P&gt;I apologise, my mistake. The problem was that I used functions incorrectly.&lt;BR /&gt;To make my code work, you need to add additional lines:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc ds2;
data _NULL_;
  method run();
    dcl int output_var;
    dcl package sqlstmt s('SELECT 1 FROM CDM.RTDMCDM1.CI_CAMPAIGN');&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;    s.execute();&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;    s.fetch();&lt;/STRONG&gt;&lt;/FONT&gt;
    output_var = s.getInt(1);
  end;
enddata;
run;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2024 11:22:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Function-sequence-error-SAS-Federation-Server/m-p/952125#M372137</guid>
      <dc:creator>John_Wick</dc:creator>
      <dc:date>2024-11-28T11:22:45Z</dc:date>
    </item>
  </channel>
</rss>

