GOTO PREVIOUS

GOTO PREVIOUS

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

GOTO PREVIOUS

Branches from an exception handler to the command that caused the exception.

Syntax

GOTO PREVIOUS

Comments

GOTO PREVIOUS is used only in an exception handler and only to branch to the command that caused the exception to occur. GOTO PREVIOUS exits the exception handler, and closes it in the same way as ENDON.

Example

Note: In this example, all transactions are assumed to be implicit transactions (i.e., single commands).

procedure UpdateDB()

 on deadlock

  output “The database is busy.”

   output “Do you want to try again? ( y/ n):” ;

   input Response

  if Response = ” y”

goto previous

  else

   return

  endif

 endon

 … the rest of the commands in the procedure …

endprocedure

If a deadlock condition occurs, the exception handler asks the application user if the transaction should be attempted again. If the answer is yes, the GOTO PREVIOUS command causes the application program to retry the command that caused the deadlock condition. If the answer is no, the procedure terminates.

See Also

GOTO

GOTO NEXT

ON

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish