EOS Function

Action

Returns the value of the end of selection condition of the last SQL SELECT command or the last fetch statement associated with a cursor. This function returns true if the result set created by a SQL SELECT command is empty or if a fetch statement sets the current row position out of the result set.

Syntax

eos ( in cCursor : cursor ) : boolean

Return value

value of the end of selection condition

Parameter

Description

cCursor Cursor with which the command or statement is associated

Example

var
  v_artno, v_stock, v_quantity:
number;

dcltrans
  transaction TMain
  begin
    c1: SelArticle();

    if eos (c1) then
      write("no articles found");
      return 1;
    end;

    while not eos (c1) do
      write(v_artno);
      ...
      fetch c1 next 1;
    end;
  end TMain;

dclsql
  SelArticle:
    SELECT stock, quantity
    INTO :v_stock, :v_quantity
    FROM article
    WHERE articlenumber = :v_artno;