Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## ON QUIT phrase

> Describes the processing that occurs when a QUIT statement is executed during a block. By default, the QUIT statement saves the current transaction and then returns to the operating system or to the tool from which the procedure was invoked (such as the Procedure Editor).

> Note: Does not apply to SpeedScript programming.

> #### Syntax

>     ON QUIT
>       [ UNDO [ label1 ] ]
>       [     , LEAVE [ label2 ]
>          |  , NEXT [ label2 ]
>          |  , RETRY [ label1 ]
>          |  , RETURN { ERROR | NO-APPLY } [ return-string ]
>       ]

> `UNDO [ `label1` ]`

> Indicates that the specified block is undone. If you do not specify the UNDO option, then the current transaction is committed when the QUIT statement is executed.

> `LEAVE [ `label2` ]`

> Indicates that after committing or undoing the transaction, Progress leaves the block labeled `label`. If you do not name a block, Progress leaves the block with the ON QUIT phrase in its heading.

> `NEXT [ `label2` ]`

> Indicates that after committing or undoing the transaction, Progress executes the next iteration of the block you name with the `label` option. If you do not name a block with the NEXT option, Progress executes the next iteration of the block with the ON QUIT phrase in its heading.

> `RETRY [ `label1` ]`

> Indicates that after committing or undoing the processing of a block, Progress repeats the same iteration of the block that was undone or committed.

> RETRY is the default if you do not specify LEAVE, NEXT, RETRY, or RETURN.

> `RETURN [ ERROR | NO-APPLY ]`

> Indicates that after undoing or committing the transaction, Progress returns to the calling procedure, or if there is no calling procedure, to the tool that invoked the procedure. Specifying ERROR causes the ERROR condition in the calling procedure. This causes the current subtransaction to be undone. You cannot specify ERROR within a user-interface trigger block. You can specify the NO-APPLY option only within a user-interface trigger block to prevent Progress from performing the default behavior for that event. For example, the default behavior for an character code key press in a fill-in field is to echo the character in the field.

> ``return-string``

> If you specify `return-string`, the string you provide is passed to the calling procedure. That procedure can use the RETURN-VALUE function to read the returned value.

> #### See also

> ON ENDKEY phrase, ON ERROR phrase, ON STOP phrase, QUIT statement, RETURN statement, RETURN-VALUE function

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095