TOPEN() Function - Start A Transaction

Syntax

TOPEN(level{,MODE="READONLY"){,ERR=lineref})

Description

The TOPEN() function starts a transaction and returns an integer transaction ID.

Parameter

Description

level

1

 

The process is able to read data that has been written by another process even if the transaction of the other process has not yet been committed. This level is fastest, but it can return results that are subsequently rolled back by another process.

 

2

The file system guarantees that if another program is in the process of changing the data that you are reading then your read will not return until the other application's transaction is either committed or rolled back.

 

3

 

The file system guarantees that data read by your application can not be changed by any other application until after you execute either a commit or a rollback. It also guarantees that other applications can not insert new records between the records that you read sequentially. When your application is informed that a record that it tried to read does not exist, other applications will not be allowed to add the missing record until after you execute a commit or a rollback.

MODE="READONLY"

This transaction will not allow WRITE or REMOVE.

ERR=lineref

Branch to be taken if an error occurs during execution.

See Also

Journaled Files and Transactions

Functions - Alphabetical Listing