image\Dql_0024.gifexit

Type

Procedural Command

Purpose

The exit command is used to immediately terminate a script.

Syntax

exit .

Usage

The exit command can be used anywhere in a script. When it is executed, the script immediately stops processing and returns control to the user or calling procedure.

Example

for MEMBERS ;

list records

TOTAL DUE in reverse ;

LAST NAME .

if current item number > 5 then

exit .

end

end

 

This script tells DataEase: (1) List the five members with the highest TOTAL DUE values, and (2) when the fifth record is processed, terminate the script. Note that two end commands are required to fulfill the DQL syntax requirements even though the exit command terminates processing.

The output from this script, arranged in descending order on the TOTAL DUE field, might look as follows:

 

Last Name

Total Due

Christino

$280.00

Perrault

$215.00

Strachan

$205.00

Stafford

$185.00

Jones

$175.00