SET CURRENTSET

Makes a specified result set the current set.

Syntax

SET CURRENTSET setname

Parameters

setname

The name of an existing result set.

Comments

Normally, the current set is the result set produced as a result of the last FIND command executed. SET CURRENTSET enables you to select another existing result set to use as the current set.

The SET CURRENTSET command takes effect immediately upon parsing or compilation, not just when the compiled program is executed.

The SET CURRENTSET command is not affected by the SET RESET and SET RESTORE commands.

Example

procedure test3 (a,b)
 if a = b
  find Employees -> EmpSet
 else
  find Departments -> DeptSet
 endif
 if a = b
  set currentset EmpSet
  let a = LastName
 endif

The SET CURRENTSET command ensures that the correct set is recognized as the current set.