Previous Topic: @RETURN SyntaxNext Topic: @RETURN Status Codes


@RETURN Parameters

CURRENT/FIRST/LAST/NEXT/PRIOR

Indicates the record whose database key will be returned.

CURRENT

Retrieves the database key for the current index entry.

FIRST

Retrieves the database key for the first index entry.

LAST

Retrieves the database key for the last index entry.

NEXT

Retrieves the database key for the index entry following current of index. If the current of index is the last entry, an error status of 1707 (end of index) is returned.

PRIOR

Retrieves the database key for the index entry preceding current of index. If the current of index is the first entry, an error status of 1707 (end of index) is returned.

SET=

Identifies the indexed set from which the specified database key is to be returned.

index-set-name

Either a register containing the name of the indexed set or a quoted variable containing the name of the set.

DBKEY=

Where the database key is returned.

db-key

A register containing the database key or a user defined variable data field.

USING=

Saves the symbolic key (CALC, sort, or index) or the specified record.

index-key-value

A register containing the index key value or the name of the user-defined alphanumeric field into which the symbolic key of the specified record will be returned. Index-key-value must be large enough to accommodate the symbolic key. For example, if the set is indexed on employee last name (15 characters) and employee first name (10 characters) the index-key-value must be large enough to accommodate 25 characters.