

Designing Dialogs › Design Considerations › Extended Run Units
Extended Run Units
Typically, a CA ADS transaction begins when the dialog issues a command accessing the database (for example, OBTAIN) and ends when the runtime system encounters the next control command issued by the dialog (that is, LINK, INVOKE, DISPLAY, TRANSFER, LEAVE, or RETURN). An extended transaction is a transaction that is kept open when the runtime system encounters the LINK command under the following circumstances:
- When the LINK is to the premap process of a dialog with no associated subschema
- When the LINK is to the premap process of a dialog with an associated schema and subschema identical to those of the calling dialog
- When the LINK is to a user program
Implications
Implications of the extended transaction are as follows:
- Currencies are passed to the lower-level dialog and are restored upon return to the upper-level dialog.
- Currencies are not passed to user programs; currencies are saved and restored to the upper-level dialog when control is returned.
- The lower-level dialog can perform error checking to decide whether to issue a ROLLBACK command.
- Because a FINISH is not issued, record locks held by the upper-level dialog are not released. A COMMIT can be coded in the upper-level dialog if the developer needs to release locks before linking to the lower-level dialog.
- If a COMMIT is issued prior to the LINK command and an abend occurs in the lower-level dialog, the rollback will be incomplete; the rollback will only go to the COMMIT checkpoint and not to the start of the transaction.
- If a lower-level user program opens its own transaction, a deadlock can occur. The possibility of a deadlock condition can be avoided by taking either of the following actions:
- Issue a COMMIT prior to the LINK.
- Pass the subschema control block to the user program and let the program use the same transaction. Issue no BINDs or FINISHes in the user program.
For more information on the extended transaction, refer to the CA ADS Reference Guide.
Copyright © 2013 CA.
All rights reserved.
 
|
|