QUIT statement

Raises the QUIT condition. By default, this exits from the ABL session and returns to the operating system.

When QUIT is executed from within a procedure running on an AppServer, it terminates the ABL session running on the AppServer, causing the AppServer agent to shut down and returns to the ABL client session from which it was spawned.

When QUIT is executed from within a procedure running on a Progress Application Server for OpenEdge (PAS for OpenEdge), the ABL session is reset to its initial state, which includes deletion of persistent procedures and static ABL objects, the disconnection of databases (or re-connection if the databases were connected at startup), and the clean-up of all global data, such as shared variables. Control then returns to the ABL client session from which the server session was accessed, and the server session is returned to its PAS for OpenEdge session pool for access by other client requests.

Note: Does not apply to SpeedScript programming.

Syntax

QUIT

Example

This procedure displays a menu. If you choose the last menu item, Exit ABL, 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 ABL".

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.

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

WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.

Notes

See also

ON QUIT phrase, STOP statement