Using Database Transactions in a Program Initiated by INVOKE

A database pointer can be thought of as a unique bookmark in a specified list of records in the database.

Note: There is only one database pointer allowed for each file in each process. When an application program is launched, a process initiates. When that program initiates another program using INVOKE, the same process manages the second program. When the message returns to the first program, the database pointer is set elsewhere if the second program changed it.

The following illustration shows a process that involves a second program initiated using INVOKE.

Note: Do not change the database pointer in a program that can be initiated with an INVOKE statement. Doing so could result in an infinite loop, because the database process could be constantly reset.

Using Database Transactions in Procedure Libraries

If a procedure called with INVOKE from a procedure library (pdlib) updates the database, it must use 910-BEGIN-SUBTRANSACTION and 920-END-SUBTRANSACTION to start and end its transaction state. Since the calling program might not already be in transaction state, the called program must use subtransactions. For a description of these procedures, see Doc for Developers: Lawson 4GL Application Program Interfaces.