You can define local variables with DECLARE statements entered in BEGIN-END and THEN statements. A local variable is released as soon as DEC DATATRIEVE completes the execution of the clause or statement in which it was declared. Although a local variable stays in effect for subsequent statements of the compound statement in which it is declared, it has no meaning in any outer statements containing that compound statement.