informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_fp_setisdone()

The mi_fp_setisdone() accessor function sets the iterator-completion flag for an iterator function in its associated MI_FPARAM structure.

Syntax

Usage

Use the mi_fp_setisdone() function to tell the database server whether the current iterator function has reached its end condition. An end condition indicates that the generation of the active set is complete. The database server calls the iterator function with the SET_RETONE iterator-status value as long as the end condition has not been set.

Valid values for the iterator-completion flag argument are as follows.

Valid Value Meaning Description
0 The end condition was reached. Once iterations are complete, the database server calls the iterator function one final time, with the iterator status of SET_END.
1 The end condition has not been reached. The database server sets the iterator status to SET_RETONE and continues to call the iterator function.

Important: Make sure that you include a call to the mi_fp_setisdone() function within your iterator function that sets the iterator-completion flag to one (1). Without this call, the database server never reaches an end condition for the iterations, which causes it to iterate the function in an infinite loop.

The iterator function does not return a value into the active set once the iterator-completion flag is set to 1.

Return Values

None.

Related Topics

See the description of the mi_fp_request() function.

For more information on how to create and call iterator functions, see Writing an Iterator Function.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved