<Jack>
So this would be something like:

If parmCommit = '0'; // no commit control
EXEC SQL SET TRANSACTION ISOLATION LEVEL NO COMMIT;
Else; // yes commitment control
EXEC SQL SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
EndIf;

This would be required before each insert, update or delete statement?

I don't understand the differences between the options READ COMMITTED, REPEATABLE READ and SERIALIZABLE.
</Jack>

@SET TRANSACTION: sets the commit level for a connection (= ACTGRP or JOB, depends on setting at compiletime or STRCMTCTL - default (ACTGRP is recommended). This statement is not allowed inside an already started transaction. Transactions are started with the first lock and end with rollback or commit. The commit level is used until next SET TRANSACTION.

@ISOLATION LEVELS:
NONE: never use it with SQL, never ever!!!
READ COMMITTED and UNCOMMITTED READ standard if you are using cursors for update (update where current of)
If you are using select into and searched updates (update where ID = :someID), REPEATABLE READ is strongly recommended!!!
SERIALIZABLE: SQL standard recommends this - not usable with AS/400 (and compatible systems)

D*B




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.