Previous Next

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.
 
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 
*
*
For more information on retry processing, see OpenEdge Getting Started: ABL Essentials.
See also 
UNDO statement

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.