RETRY function Returns a TRUE value if the current block is being reprocessed after a previous UNDO, RETRY. Syntax RETRY Example This procedure bypasses the display of the Customer data when the REPEAT block is retried (if user changes the Customer data and does not specify a country). When you run this procedure, notice that even though the procedure has undone any data that you entered (if you did not specify a country), the data still appears in the window. The data is saved in the screen buffers, but it is not stored in the Customer record buffer. If you do not use the RETRY function, the AVM reprocesses the DISPLAY statement and displays the previous values for the Customer fields, overwriting the data that was entered in error. r-retry.p REPEAT: PROMPT-FOR Customer.CustNum. FIND Customer USING Customer.CustNum. IF NOT RETRY THEN DISPLAY Customer.Name Customer.Address Customer.City Customer.State Customer.Country. ELSE DISPLAY Customer.Country. SET Customer.Name Customer.Address Customer.City Customer.State Customer.Country. IF Customer.Country = "" THEN UNDO, RETRY. END. Notes Using the RETRY function in a block turns off the default error processing, which result in no infinite loop protection for the block. For more information on retry processing, see OpenEdge Getting Started: ABL Essentials. See also UNDO statement
RETRY
REPEAT:
PROMPT-FOR Customer.CustNum.
FIND Customer USING Customer.CustNum.
IF NOT RETRY THEN
DISPLAY Customer.Name Customer.Address Customer.City Customer.State
Customer.Country.
ELSE
DISPLAY Customer.Country.
SET Customer.Name Customer.Address Customer.City Customer.State
IF Customer.Country = "" THEN UNDO, RETRY.
END.