5.31.6 SET

The SET command is used to set the current directory and database connection behavior.

Syntax:

Command

Keyword

Value

Developer notes

SET

DIR

value

Optional. Use the DIR keyword to nominate a relative or absolute directory path to be set as the current directory.

ONERROR

*ROLLBACK

Optional. The keyword is used to indicate the action you want to take if an exception is encountered during the execution of the SQL statement.

If an exception is encountered during the execution of the SQL statement, a rollback will be initiated.

Default.

*CONTINUE

If an exception is encountered during the execution of the SQL statement, the processing will continue.

*DISCONNECT

If an exception is encountered during the execution of the SQL statement, the database connection will be closed.

ONWARNING

*STOP

Optional. This keyword is used to indicate the action you wish to take if a warning message is issued during the execution of the SQL statement.

If a warning is encountered during the execution of the SQL statement, the command will be stopped.

Default.

*CONTINUE

If a warning is encountered during the execution of the SQL statement, the processing will continue.

READONLY

*YES

Optional. Enables database connection read-only mode.

No default.

*NO

Disables database connection read-only mode.

AUTOCOMMIT

*YES

Optional. Enables database connection auto-commit mode.

No default.

*NO

Disables database connection auto-commit mode.

ISOLATION

*NONE

Optional. Set connection transaction isolation level to NONE.

No default.

*READCOMMITTED

Set connection transaction isolation level to READ COMMITTED.

*READUNCOMMITTED

Set connection transaction isolation level to READ UNCOMMITTED.

*REPEATABLEREAD

Set connection transaction isolation level to REPEATABLE READ.

*SERIALIZABLE

Set connection transaction isolation level to SERIALIZABLE.

 

Example

SET ISOLATION(*READCOMMITTED) AUTOCOMMIT(*NO)