EXIT CLPPlus command

The EXIT CLPPlus command ends the CLPPlus session and returns control to the operating system. This command is synonymous with the QUIT command.

Invocation

You must run this command from the CLPPlus interface.

Authorization

None

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagramEXIT SUCCESSFAILUREWARNINGvaluevariable:bindvariable COMMITROLLBACK

Command parameters

SUCCESS
Returns an operating system-dependant return code that indicates success.
FAILURE
Returns an operating system-dependant return code that indicates failure.
WARNING
Returns an operating system-dependant return code that indicates a warning.
value
Specifies a variable that is created by the DEFINE command whose value is returned as the return code.
variable
Specifies a substitution variable value that is created by the DEFINE command whose value is returned as the return code.
:bindvariable
Specifies a Bind variable value that is created by the DEFINE command whose value is returned as the return code.
COMMIT
Specifies that uncommitted updates are committed when the CLPPlus session ends.
ROLLBACK
Specifies that uncommitted updates are rolled back when the CLPPlus session ends.

Examples

In the following example, the EXIT command is issued with the SUCCESS parameter.
SQL> exit success
You can review whether the return code indicates success by running the echo %errorlevel% command.
echo %errorlevel%
0
In the following example, the EXIT command is issued with the WARNING and COMMIT parameters.
SQL> exit warning commit
You can review the return code for by running the echo %errorlevel% command.
echo %errorlevel%
2

In the following examples, the substitution variable exit_value is defined, set to 5, and used in the EXIT command.

SQL> variable exit_value integer
DB250000I: The command completed successfully.
SQL> exec :exit_value:=5 ;
DB250000I: The command completed successfully.
SQL> exit :exit_value rollback
You can review the return code for by running the echo %errorlevel% command.
echo %errorlevel%
5