Changes the state of the LDBint sm_ldb_state_set (char *ldbname, int state_type, int new_value);int sm_ldb_h_state_set (int ldbhandle, int state_type, int new_value);
- The name of the LDB whose state you want to set.
- The integer handle of the LDB whose state you want to set.
- Specifies the state to set with one of these constants:
- A Yes/No flag that specifies whether the LDB is active. Only active LDBs participate in LDB write-through.
- A Yes/No flag that specifies whether the LDB is read-only. The default for newly activated LDBs is set to No. Screens can read from this LDB on screen entry but cannot modify it on exit; consequently, a read-only LDB cannot be used to transfer values from one screen to another.
- A value of 1 (Yes) or 0 (No) to set for
sm_ldb_state_setlets you change the status of an LDB in one of two ways:
- Allow or disallow participation in LDB write-through. If a loaded LDB has its active state (
LDB_ACTIVE) set to Yes, screens can, at a minimum, read its data; if the LDB's
LDB_READ_ONLYstate is set to No, screens can also write data to it. For more information about LDB write-through, refer to "Using Local Data Blocks" in Application Development Guide.
- Set the LDB data to be read-only. If an active LDB is read-only—
LDB_READ_ONLYis set to Yes—a screen can read that LDB's data but cannot use it to propagate data to other screens. By default, newly activated LDBs have
LDB_READ_ONLYset to No.