RETRY function

Returns a TRUE value if the current block is being reprocessed after a previous UNDO, RETRY.

Syntax

RETRY

Example

DEFINE VAR badState AS CHAR NO-UNDO.

FOR EACH Customer:
    IF RETRY THEN
    DO:
        /* So user can see the bad value they typed */
        Customer.State = badState.
    END.
    UPDATE City State PostalCode.
    IF NOT CAN-FIND(State WHERE State.State = Customer.State) THEN DO: 
        MESSAGE "This is not a valid state"
            VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
        badState = Customer.State.
        UNDO, RETRY.
    END.
END.

Notes

See also

UNDO statement