

Designing Dialogs › Dialogs That Issue Navigational DML › Database Currencies: How Currency is Maintained
Database Currencies: How Currency is Maintained
In CA ADS, currency is maintained automatically for the user. To facilitate this feature, a currency control block is created that maintains currency information. At run time, a currency block is created for each dialog in the application structure that performs database requests.
Database currencies are passed from one dialog to another dialog at a lower level, enabling dialogs to continue database processing from an established position in the database. Currencies are cumulative. The currencies established by each dialog are passed to lower-level dialogs, which, in turn, establish their own currencies; the cumulative currencies are passed to the next lower-level dialog.
Currencies are established, saved, restored, and released as follows:
- Established — Currency is established with the dialog's first functional database call. Established currencies are updated when database commands (for example, FIND, OBTAIN, ERASE) are encountered during the run unit. Currency is nulled when a dialog receives control with a RETURN or TRANSFER command.
- Saved — When a LINK, DISPLAY, or INVOKE command is issued, the database currencies established with the last database command in the dialog are saved. Saved currencies are available to lower-level dialogs and are restored to the issuing dialog if processing control returns.
- Restored — Saved currencies are restored when CA ADS opens a run unit in the dialog receiving control (that is, saved currencies are restored just prior to the first database call).
- Released — When a LEAVE, RETURN, or TRANSFER command is issued, all database currencies at the same and lower levels are released. The dialog receiving control must establish its own currencies or use the currencies passed to it from another higher-level dialog.
The successful execution of control commands can affect the operative or nonoperative status of a dialog, the dialog's acquired data that is retained or released, and the currencies that are saved, restored, or released.
Copyright © 2013 CA.
All rights reserved.
 
|
|