Consultor Eletrônico



Kbase P143129: 4GL/ABL: Why does the FIND CURRENT statement with the NO-ERROR option NOT set the ERROR-STATUS:ERROR
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   24/03/2009
Status: Unverified

GOAL:

4GL/ABL: Why does the FIND CURRENT statement with the NO-ERROR option NOT set the ERROR-STATUS:ERROR to YES when a TEMP-TABLE record is NOT AVAILABLE?

GOAL:

Why does the FIND CURRENT without the NO-ERROR option NOT generate error "** No <file-name> record is available. (91)" if the TEMP-TABLE record is NOT AVAILABLE?

FACT(s) (Environment):

All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)

FIX:

The following code snippets Unlike its behavior when executed against database tables, the FIND CURRENT statement on a TEMP-TABLE, a WORK-TABLE or a WORKFILE is a do-nothing instruction (NO-OP). It is actually optimized out of the code at compile time.
Therefore, the FIND CURRENT statement with the NO-ERROR option does NOT set the ERROR-STATUS:ERROR to YES when a TEMP-TABLE record is NOT AVAILABLE because the statement simply does nothing.
Similarly, the FIND CURRENT without the NO-ERROR option does NOT generate error "** No <file-name> record is available. (91)" if the TEMP-TABLE record is NOT AVAILABLE because the statement is a NO-OP statement.
This has been the behavior of the FIND CURRENT statement when used against a TEMP-TABLE, a WORK-TABLE or a WORKFILE since its initial introduction to the 4GL/ABL language.
See the code snippets in the note below to compare the behavior of the the FIND CURRENT statement when it is executed against a TEMP-TABLE vis-a-vis its behavior when it is executed against a database table.