Database currencies are established by the last database command in an operative dialog. Currencies are saved and made available to lower level dialogs and to the dialog that established the currencies if control returns to that dialog from a lower application level.
Considerations
The following considerations apply to currencies:
Currencies established by each dialog or dialog function are passed to lower level dialogs along with any currencies received from a higher level dialog. A lower level dialog can establish new currencies, which are passed to the next lower level dialog along with the currencies already established.
Unless the dialog or dialog function receiving control specifies the NOSAVE keyword on a LINK command, it establishes its own currencies. These currencies are established either by restoring the currencies saved when it originally passed control or by using currencies previously established by a higher level dialog. The following diagram shows currencies in an CA ADS application.
Currency Action
DIALOG A ┌──────────────────────┐ │ Currencies │ │Received Established│ DIALOG A executes and establishes │ EMP A ◄───┐ current records of two sets. │NONE DEPT X │ │ │ │ │ └──────────┬───────────┘ │ │ LINK │ v │ DIALOG A links to DIALOG B and DIALOG B │ establishes a current record of ┌──────────────────────┐ │ a third set. │ Currencies │ │ │Received Established│ │ │EMP A EMP A │ │ │DEPT X DEPT X │ │ │ OFFICE M │ │ └──────────┬───────────┘ │ │ INVOKE │ v │ DIALOG B invokes DIALOG C. DIALOG C │ ┌──────────────────────┐ │ │ Currencies │ │ │Received Established│ │ │EMP B EMP C │ │ │DEPT Y DEPT Z │ │ │OFFICE M │ │ └──────────┬───────────┘ │ │ │ DIALOG C returns control to └───────────────┘ DIALOG A: - Only currencies established by DIALOG A are available. - Record buffers still contain data established by DIALOG C
Effect of Control Commands on Issuing and Receiving Dialogs
The following table outlines the effect of control commands on issuing and receiving dialogs. The EXECUTE NEXT FUNCTION command is not included in this table. The characteristics established by EXECUTE NEXT FUNCTION depend on which command is actually executed.
|
Command |
New level estab- lished |
Status of issuing dialog |
Data avail. to receiving dialog/ program |
Currency action for issuing dialog |
Currency action for receiving dialog/ program |
|---|---|---|---|---|---|
|
DISPLAY |
No |
Operative |
All data |
Saved |
N/A |
|
INVOKE |
Yes |
Operative |
All data |
Saved |
Restored |
|
LEAVE |
No |
Non- operative |
N/A |
Released |
N/A |
|
LINK: |
|
|
|
|
|
|
DIALOG |
Yes |
Operative |
All data |
Saved, unless NOSAVE is specified |
Restored |
|
PROGRAM |
No |
Operative |
All, some, or none (depending on command specification) |
Saved, unless NOSAVE is specified |
Program receives currencies as part of extended run unit |
|
RETURN |
No |
Non- operative (any operative dialogs between the issuing dialog and the receiving dialog also become non- operative) |
Data previously available to the receiving dialog |
Released (curren- cies for any dialogs between the issuing dialog and the receiving dialog are also released) |
Restored |
|
TRANSFER |
No |
Non- operative |
All data except that acquired by the issuing dialog |
Released |
Can use currencies previously established by higher level dialogs |
|
Copyright © 2014 CA.
All rights reserved.
|
|