SUSPEND

Top  Previous  Next

Send the values in the output parameters to the caller.

 

Syntax

  SUSPEND;

 

The SUSPEND statements sends the values in the output parameters to the caller and continues execution. This can be used in loops, to simulate an output result set, or for occasions where outputting multiple rows of values is required.

 

Example

EXECUTE UDSBLOCK

RETURNS (o integer, msg varchar(100))

AS

BEGIN

  o = 1;

  msg = 'First output';

  SUSPEND;

  o = 2;

  msg = 'Second output';

  SUSPEND;

  o = 3;

  msg = 'Third output';

  SUSPEND;

END