PreviousNext
Help > Development > Accessing AS/400 data > Native Access > Journals and Transactions
Journals and Transactions

 On AS/400, transactions management uses journals and journal receivers.

     Create a journal receiver : CRTJRNRCV

     Create a journal : CRTJRN

     Start file journalization : STRJRNPF

When the file is created by Easycom For WinDev, from its definition in the Analysis, all these operations are automatically done.

 

In native mode, you cannot use HTransactionStart. Use SQLTransaction.

All files to be included in transactions must have JOURNALED property set in Extended info:

<EASYCOM>
JOURNALED=TRUE
</EASYCOM>

 

All imported files have this property set.

Connection property AUTOJOURNAL puts all the files in transaction mode.

Transaction is cancelled in case of error, or in case the program ends abnormally.

 

It is preferable to open the files inside a transaction.

When transaction is used in a program, it is preferable to not do any insert, update or delete operation out of a transaction.

 

Start a new transaction: SQLTransaction(SQLStart)

Validate the transaction (COMMIT): SQLTransaction(sqlCommit)

Cancel transaction (ROLLBACK): SQLTransaction(sqlRollback)