DATASETS Client Control Table

The DATASETS table contains information about each DMSII data set as permitted by the DATABridge host support library filters. The DATASETS table contains state information for each data set visible to the Client, including the current replication phase of the data set. When the data has been successfully extracted, this table includes the location in the audit trail from which the last group of updates for the data set were read, including the audit file number, the audit block sequence number, the segment number, an index that identifies the physical location of the block in the audit file, and a timestamp.

The active column of the DATASETS table controls the selection of all tables mapped from a DMSII data set. (The SQL statements in your user script use the active column in this table to specify data sets you do not want to clone.) If you use the DATASETS table to disable cloning for a data set, you disable cloning for all tables related to that data set.

For example, one DMSII data set with a nested OCCURS item can generate multiple tables. If you do not want to clone any of these tables, use the active column in the DATASETS client control table to turn off cloning. For more information on selectively cloning data sets, Tips for More Efficient Cloning.

The following table contains descriptions of each column in the DATASETS client control table. It also provides the abbreviated column name from the trace.log file when applicable. (This name occurs in the trace file when you enter the dbutility display command.) When the DATASETS table appears in the trace file, the ABSN values are displayed in both hexadecimal and decimal.

Column name

Display

Description

data_source

 

This column contains the name of the data source that identifies the DMSII database from which the data was taken. The data source name is defined when you run dbutility define. It must match the name on the data source statement in the Server Accessory parameter file on the host.

dataset_name

ds

This column contains the name of the DMSII data set.

rectype

/type

This column, which is zero for all fixed-format data sets, contains the record type of a DMSII variable-format data set as follows:

Record Type

Description

0

For a variable-format data set, this represents records that have no variable part.

1–254

Represents the variable-format record type as defined in the DASDL.

set_name

set

This column contains the name of the DMSII set that DBEngine uses as an index source for tables mapped from the data set. The names "aa_set" and "user_set" are special set names that the DATABridge Client uses when a DMSII set is not available. The name "aa_set" indicates that AA values (or RSNs) will be used as the source for the index. The name "user_set" indicates that the set is user‑defined.

active

A

During a define or redefine command, this column determines whether or not a data set is mapped. During a process command, the value of this column determines if the data set is to be selected for cloning or updating. The default, 1, indicates that the data set will be mapped (cloned or updated). A value of 0 indicates that the data set will not be mapped (cloned or updated). The define and redefine commands change the value in the active column to 0 if the data set contains global database information or is the restart data set.

Note: When you change the DATASETS active column value to 0 to disable cloning, all tables related to the data set are disabled. For example, if a DMSII data set is represented by three relational database tables, none of the three relational database tables will be cloned.

strnum

ST#

This column contains the DMSII data set structure number.

audit_filenum

AFN

This column contains the current DMSII audit file number. DMSII audit files are created and stored on the host; they contain a record of all updates to the DMSII database and are named as follows:

databasename/AUDITnnnn

where databasename is the name of the DMSII database, AUDIT is a literal, and nnnn is the AFN (audit file number) whose value is a number between 1 and 9999. Before you run dbutility process to clone a DMSII database, the audit file number (and all the other audit file location information) is zero; subsequent process commands fill these records with the ending audit file location.

audit_block

ABSN

This column contains the audit block serial number in the audit file. Because DMSII now uses 32-bit audit block serial numbers, the data type for this column is binary (raw in Oracle). All displays in the log file show this value as a 10-digit unsigned number. If you access this column via a relational database query tool, the hexadecimal value appears instead.

audit_seg

SEG

This column contains the segment number within the audit file.

audit_inx

INX

This column contains the index within the audit file segment.

audit_ts

Time Stamp

This column contains the audit file timestamp.

ds_mode

M

There are a few cases where you may need to change the mode. The ds_mode value provides the following information about the data set:

Value

Description

0

The data set is ready to be cloned; any existing table with the same name is dropped and a new table with the same name is created.

1

The data set is in the fixup phase; data extraction is complete and the table is being updated with changes that occurred during the extraction. The integrity of the data in the tables mapped from the data set is not guaranteed to be correct until the fixup phase is complete.

2

The data set is ready to be updated. This implies that it has already been cloned and the fixup has been completed. This is the most common mode.

11

An error occurred during index creation or the tables mapped from this data set do not have an index defined.

12

The data set is using AA values as keys, and the AA values are no longer valid because the data set has been reorganized.

31

The data set must be reorganized (DBV_MODE_NEEDREORG) and the redefine command has created scripts to make the relational database table match the DMSII data set. You must run the reorg command in order to run the reorganization scripts created by the redefine command.

33

The reorg command failed for this data set (DBV_MODE_REORGFAILED). In this case, you must manually update the table by trying to fix the failed script. Then, set ds_mode and repeat the reorganization command. If that fails, you must reclone it.

host_fmtlevel

 

This column contains the format level as seen by the host. The value is the update level received from DBEngine in the last STATEINFO record.

client_fmtlevel

FMT

This column contains the format level as seen by the DATABridge Client. The value is determined by the dbutility define and redefine commands. Typically, the host and client format levels are the same until a DMSII reorganization is detected.

recsz_bytes

RSZ

This column contains the size of the record in bytes.

parent_strnum

P#

This column contains the parent structure number. This column is used for embedded data set information.

num_children

#C

This column contains the number of child structures for the parent structure. This column is used for embedded data set information.

base_strnum

B#

This column contains the base structure number. If the value in this column is not equal to the value in the strnum column, this data set is a remap of the data set whose structure number is base_strnum.

subtype

ST

This column contains the structure subtype of the DMSII data set:

Value

Description

0

Standard data set

1

Random data set

2

Ordered data set

3

Unordered data set

4

Global data

5

Direct data set

6

Compact data set

16

Restart data set

17

Virtual data set

in_sync

 

The in_sync column tracks data sets whose stateinfo is synchronized with the stateinfo stored in the Global_DataSet row for the data source in the DATASETS client control table.

Global_DataSet is a dummy data set that holds the common stateinfo for data sets whose ds_mode is 2. When the DATABridge Client is finished updating, the stateinfo in the Global_DataSet is copied to all data sets that need to be updated with the stateinfo. Values in this column indicate the following:

Value

Description

0

The data set stateinfo is current.

1

The data set stateinfo must be corrected at the end of update processing to reflect the stateinfo as it is stored in the Global_DataSet.

item_count

ICNT

The value in this column indicates the number of items in the DMSII data set and is used by DBEngine to detect filler substitutions and changes in DBGenFormat.

audit_time6

 

The value in the audit_time6 column is the DMSII timestamp stored as 6 binary characters. The Client uses this value when it sends state information (stateinfo) to DBEngine at the beginning of a process or clone command. The Client does not use the value in the audit_ts column; it is provided for documentation purposes (it is not an accurate binary value).

Caution: When you enter values for the stateinfo, you must set the audit_time6 column to 0 because the DBEngine uses this value to detect DMSII rollbacks. If the value of the timestamp is 0, DBEngine bypasses this test.

For SQL Server, set audit_time6=0.
For Oracle, set audit_time6='000000000000'.
For DB2, set audit_time6=x'000000000000'.

host_info

 

The information in the host_info column is provided by the DBEngine during data extraction. It enables the DATABridge Client to recover fixups if the command is aborted. This information is stored as 6 binary characters.

ds_options

OP

The following bits, which can be set through customization user scripts, which control how data sets are mapped:

Bit

Description

1

DSOPT_Use_bi_ai - This bit is set by the define command for data sets that have OCCURS clauses (that were not flattened) when the configuration file parameter optimize_stateinfo was set to True. This bit causes the program to request that the DBEngine send all updates for the data set as BI/AI pairs. You can set this bit to 0 via user scripts if you want to disable optimization of updates for this data set.

2 and 4

Reserved

8

DSOPT_Save_Updates - This bit causes the DATABridge Client to generate history tables for all tables that are mapped from the data set.

To determine whether the history tables are populated with clone data only or clone and update data, see history_tables.

16

DSOPT_Include_AA - This bit should not be used to force the client to use AA values (RSNs) as the source for the index. Use the bit DSOPT_Use_AA_Only instead.

32

DSOPT_Ignore_Dups - This bit is used for virtual data sets.

64

DSOPT_Select_Only - This bit inhibits the creation of tables and stored procedures for the data set.

128

DSOPT_Keep_Null_Alpha_Keys - This bit indicates that the program should treat NULL alpha keys as blanks instead of discarding such records.

256

DSOPT_Keep_New_Columns - This bit overrides the suppress_new_columns parameter for the corresponding data set.

512

DSOPT_MultiInput - When the automate_virtuals parameter is also enabled, this bit indicates that data for the virtual data set comes from more than one real data set.

This bit tests the res_flag before executing the stored procedure i_tablename. If the flag is set, the insert is done normally; otherwise, the stored procedure r_tablename is called to update the res_flag. If the update fails, an insert is performed instead.

1024

DSOPT_MultiSource - This bit indicates that the tables generated from the data set get their input from more than one data source and ensures that the DATABridge Client doesn't drop the tables. The DATABridge Client uses the cleanup scripts, which it generates for such tables, to remove the records that belong to the data source. The most common use of this option is to add DMSII data to a set of tables whose data comes from some other source.

2048

DSOPT_MergedTables - This bit allows the DATABridge Client to place data retrieved from multiple data sources into the same set of tables. Each data source is given a unique ID and a unique prefix (in the data_source_id column of the corresponding DATASOURCES table entries) that the program uses when it constructs the merged tables (though the stored procedures for each data source are separate). This prefix serves as an alias to the actual table.

These tables cannot be dropped during a DMSII reorganization. They must be altered in such a way that they can continue to be reused.

Note: This bit must be used with the DSOPT_MultiSource bit.

4096

DSOPT_CheckKeyChanges - This bit represents the value of the KEYCHANGEOK attribute of the DMSII SET used as an index for the tables. It is a copy of the DSFLG_KeyChg_Allowed bit in the misc_flags column of the DATASETS table. When this bit is set, the program requests BI/AI pairs for all updates and compares the key items in the before image and after image to determine whether or not the update should be treated as a delete/create pair before doing the actual update. In the case of user defined keys, setting the ds_options bit to 1(via user scripts) causes the program to check for key changes. You can set this bit to 0 via user scripts if you do not want to incur the extra overhead and are certain that no key changes exist.

8192

DSOPT_HistoryOnly - Causes the define and redefine commands to generate only history tables for the data set in question. This makes it possible to generate history tables for data sets that cannot be tracked because they lack a unique index. This bit implements the parameter history_tables=2 for individual data sets. See history_tables.

Note: If you set this bit, you must also set bit 8 (DSOPT_Save_Updates).

16,384

DSOPT_Use_AA_Only - This bit causes the define and redefine commands to use AA values or RSN as the index, even if the data set has a SET that qualifies for use as an index. This bit overrides the DSOPT_Include_AA bit.

32,768

DSOPT_Clrdup_Recs - This bit determines whether the Client runs the script script.clrduprecs.dataset_name when the creation of an index fails at the end of the data extraction phase. You can customize this bit.

65,536

DSOPT_Split_Varfmt_ds - This bit causes the define and redefine commands to split variable format data set records (of types other than 0) into two parts. The fixed part is placed in the base table, which normally holds type 0 records. The variable part is placed in the secondary table name <ds_name>_type<nn> after the keys, which must also be included.

131,072

DSOPT_ExtColsSet – This bit indicates that the external_columns column has been customized by the Client Configurator or by a user script. You must set this bit whenever you change the value of external_columns for a data set. Otherwise, the Client Configurator won't retain your change.

 

262,144

DSOPT_SetNameChange – This bit indicates that the set_name was changed to “user_set”. The Client sets this bit when the user defines a composite key using the Client Configurator. Its only purpose is to ensure that this change will be remembered.

changes

These bits are used by the redefine command.

Bit

Description

1

CHG_new - New entry

2

CHG_modified - Modified entry

4

CHG_del_before - One or more entries before this one were removed.

8

CHG_del_after - One or more entries after this one were removed.

16

CHG_format_level - The data set’s format level changed (that is, a DMSII structural reorganization that affects this data set has occurred).

32

CHG_item_count - The data set’s item count has changed (that is, a filler substitution reorganization has occurred).

64

CHG_user_change - There were user changes to the DMS_ITEMS or the DATAITEMS tables (that is, the layout has changed as a result of actions by the user rather than a DMSII reorganization.

128

CHG_links_change - DMSII links changed for the data set.

256

CHG_AA_values_changed - This bit indicates that the data sets AA values are no longer valid. The bit is set by the redefine command but is otherwise not use by the Client.

1024

CHG_deleted - The item was deleted.

status_bits

SB

The following bits are used by this column:

Bit

Description

1

DS_Needs_Mapping - This bit indicates that the data set has not been mapped. All data sets that have their corresponding active column set to 0 in the data set selection script script.user_datasets.datasource also have this bit set. If you decide to clone such a data set, you must set the active column to 1 and run the redefine command to perform the mapping.

2

DS_Needs_Generating - This bit indicates to the generate command that the scripts for the data set need to be generated. Note that the generate command only generates user scripts for data sets that have this bit set. The define and redefine commands automatically set this bit.

4

DS_Needs_Remapping - This bit forces the redefine command to refresh the mapping. After you make changes to the data table user_define customization scripts, you may want to set this bit before you execute a redefine command.

8

DS_Needs_Redefining - This bit is automatically set by the process and clone commands when DBEngine detects a structural reorganization or a filler substitution for the data set. You can set this bit to force the redefine command to refresh the DMSII layout.

16

reserved

32

reserved

64

This bit indicates that the AA values are invalid. Do not modify this value.

128

This bit indicates that the index creation failed. Do not modify this value.

256

This bit indicates that the data set is in fixup mode. Do not modify this value.

misc_flags

MISC

This column contains an integer that holds a series of flags set by DATABridge to reflect some characteristics of the individual data sets.

Note: Do not change the value of these bits.

Bit

Description

1

DSFLG_Valid_Parent_AA - This flag, set by the DATABridge Client, indicates that the parent structure of an embedded data set has a valid AA value.

2–8

Reserved

16

DSFLG_Links - This flag, set by the DBEngine in response to a DB_DataSets remote procedure call (RPC), indicates that the data set has DMSII links to other data sets.

32

DSFLG_Altered - This flag, set by the DBEngine in response to a DB_DataSets RPC, indicates that the data set was altered by the support library.

64

DSFLG_Static_AA - This flag, set by the DBEngine in response to a DB_DataSets RPC, indicates that the DBEngine is using RSNs (record serial numbers) in place of AA values. RSNs are only available in a DMSII XE system where each record in a data set is assigned a unique serial number. Using the RSN in place of AA values eliminates the need to reclone tables after a DMSII garbage collection reorganization.

128

DSFLG_Valid_AA - This flag, set by the DBEngine in response to a DB_DataSets RPC, indicates that the data set has valid AA values. Not all data sets have valid AA values. For details, see Composite Keys.

Note: This bit does not apply to RSNs, which are always valid; it applies to the AA values.

256

DSFLG_Has_Occurs - This flag indicates that the data set contains items with unflattened OCCURS clauses. The program uses this bit in conjunction with the optimize_updates parameter to determine whether the DSOPT_Use_bi_ai bit in the ds_options column should be set. The DSOPT_Use_bi_ai bit can be reset by the user to prevent the use of before/after images for data sets where this action offers no significant performance improvements (for example, an OCCURS 2 TIMES clause is probably not worth optimizing).

512

DSFLG_Uses_AA_values - This flag indicates that the data set uses AA values as keys. The program uses this flag to avoid having to look at the table columns to determine whether AA values are used.

Note: This bit is not set when the DATABridge Client uses RSNs instead of AA values.

1024

DSFLG_Has_Links - This flag indicates that the data set has active DMSII links. This bit can be zero if all the links have their active columns set to 0 in DMS_ITEMS.

2048

DSFLG_Is_LinkedTo - This flag indicates that one or more data sets have active DMSII links that use AA values as foreign keys to point to this data set. The program uses this information to force the AA values to be used as the keys for the tables derived from this data set.

4096

DSFLG_Occ_Depends - This flag indicates that the data set contains items with unflattened OCCURS DEPENDING ON clauses. The program uses this bit to request that the DBEngine send updates to this data set as before/after images, regardless of the value of DSOPT_Use_bi_ai bit in ds_options for this data set.

8192

DSFLG_Uses_Parent_AA - This flag indicates that the data set uses Parent_AA values as foreign keys. The program uses this to avoid having to look at the table columns to determine if the Parent_AA values are used.

16384

DSFLG_Data_Extracted - This flag indicates that the data set was successfully cloned. The program uses this flag to determine if a table is being recloned.

Note: This information is vital when preserving deleted records.

32,768

DSFLG_Key_Chg_Allowed - This flag represents the value of the KEYCHANGEOK attribute of the DMSII SET used as an index for the tables. This value is copied to the DSOPT_CheckKeyChanges bit (in the ds_options column of this table) when the check_key_changes configuration file parameter is set to True. You can modify the DSOPT_CheckKeyChanges bit via user scripts.

65,536

DSFLG_Data_Dirty - This flag is only meaningful for virtual data sets that get data from more than one DMSII data set. It indicates that phase two of the data extraction process is under way. This flag indicates that the appropriate cleanup script must be invoked when the table is recloned (such tables can be partially recloned).

Note: This information is vital to being able to partially reclone such tables.

max_records

MAXRECS

This column contains an integer that holds the maximum row count of the data set as estimated by the DBEngine. This is the exact number that appears in DBLister reports. The DBEngine computes this estimate by dividing the file size by the record size. This value is very inaccurate in the case of variable-format data sets because it is impossible to determine how many records of a given type exist in the data set without doing a full scan of the data set.

virtual_ds_num

VDS

This column contains an integer value that holds the structure number of the virtual data set to which the DMSII data set is linked. This column is used by the parent data set to point to the associated virtual data set. When more than one virtual data set is derived from a real data set, these data sets are chained together using this column.

real_ds_num

RDS/type

Note: This display name is combined with the real_ds_rectype value.

This column contains an integer that holds the structure number of the primary real data set from which the virtual data set is derived. When more than one virtual data set is derived from a real data set, these data sets all point back to the real data set through their real_ds_num column. These real data sets are chained together, starting with the primary data set, by using the otherwise unused real_ds_num columns of the actual data sets.

real_ds_rectype

 

The integer in this column represents the record type of the variable-format data set. This information serves to further identify a variable-format data set when it is cloned as a virtual. In addition, the variable-format data set is linked to the virtual data set through the virtual_ds_num and real_ds_num columns.

external_columns

EXTC

This column contains an integer value that determines which predefined non-DMSII columns are automatically added to this data set. For a description of these bits, see Numeric Date and Time in Non-Contiguous Columns.

ds_user_bmask

 

This column, which shadows the ds_options column, contains a bit mask that represents the columns in ds_options that were customized. This column is used by the redefine command to restore the portion of ds_options that has been customized while leaving the remaining bits intact.