Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## QUIT statement

> Raises the QUIT condition. By default, this exits from Progress and returns to the operating system. When QUIT is executed from within a procedure running on an AppServer, it terminates the OpenEdge session running on the AppServer, causing the AppServer server to shut down and returns to the OpenEdge client session from which it was spawned.

> Note: Does not apply to SpeedScript programming.

> #### Syntax

>     QUIT

> Example

> This procedure displays a menu. If you choose the last menu item, Exit Progress, the procedure processes the QUIT statement.

> r-quit1.p
>     DEFINE SUB-MENU cusmaint1
>         MENU-ITEM crecust LABEL "Create New Customer"
>         MENU-ITEM chgcust LABEL "Chan&ge Existing Customer"
>         MENU-ITEM delcust LABEL "Delete Customer"
>         MENU-ITEM prtcust LABEL "Print Customer List"
>         MENU-ITEM extcust LABEL "E&xit PROGRESS".

>     DEFINE MENU mainbar MENUBAR
>         SUB-MENU cusmaint1 LABEL "Customer".

>     ON CHOOSE OF MENU-ITEM crecust
>        RUN newcust.p.

>     ON CHOOSE OF MENU-ITEM chgcust
>        RUN chgcust.p.

>     ON CHOOSE OF MENU-ITEM delcust
>        RUN delcust.p.

>     ON CHOOSE OF MENU-ITEM prtcust
>        RUN prncust.p.

>     ON CHOOSE OF MENU-ITEM extcust
>        QUIT.

>     CURRENT-WINDOW:MENUBAR = MENU mainbar:HANDLE.
>     CURRENT-WINDOW:VISIBLE = TRUE.

>     WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.

> #### Notes

> - To modify the QUIT statement, by add the ON QUIT phrase to a block.

> - If QUIT is executed during a transaction, Progress commits the transaction before exiting.

> #### See also

> ON QUIT phrase, STOP statement

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