RECALL

From Recital Documentation Wiki
Revision as of 09:49, 30 November 2009 by Barrymavin (Talk | contribs)

Jump to: navigation, search

Purpose

Reinstate records that are marked for deletion


Syntax

RECALL [<scope>]

[FOR <condition>]

[WHILE <condition>]


See Also

DELETE, PACK, SET DELETED, SET FILTER, ZAP


Description

The RECALL command is used to reinstate those records that are marked for deletion in the active table. The default scope for the RECALL command is only to recall the current record. Records marked for deletion cannot be recalled once a table has been packed. If SET FILTER TO is in effect, then any records that do not satisfy the filter condition are not recalled. While SET DELETED ON is in effect, all deleted records are automatically filtered and cannot be recalled.

FOR <condition>

If the FOR clause is specified, then only those records which satisfy the <condition> are considered for recalling. If no <scope> was specified and the FOR clause was specified, then a scope of ALL is used.

WHILE <condition>

If the WHILE clause is specified, then the RECALL command terminates as soon as the specified <condition> is .F.. The WHILE clause is often used in conjunction with the FIND or SEEK commands to RECALL records which have a common key.

If the table is indexed, then the records are read in index order unless you specify RECORD <expN>, as the scope. If the currently selected table is not opened exclusively, the Recital/4GL will automatically lock each record in turn, recall it if required, then unlock the record.

Recital positions to EOF when RECALL specifies FOR or WHILE conditions and SET COMPATIBLE TO <XBASE> is in effect.


Example

use patrons index events
delete for event = "OPERA" and eventdate < date()
seek "OPERA"
recall rest while event = "OPERA" and eventdate < date()


Products

Recital Server, Recital