DATAITEMS Client Control Table

This table duplicates the DMSII information in the DMS_ITEMS table and contains the layout information for the tables in the relational database. This table is not directly linked to the DATASETS table. Instead, it is linked to the DATATABLES client control table using the table_name column as a foreign key.

You can use the DATAITEMS client control table to specify the data items you do not want to clone by setting their corresponding active column to 0. However, it is recommended that you accomplish this by setting the active column to 0 in the DMS_ITEMS table. Using the DATAITEMS table can lead to unnecessary table splits. Unused columns cause the column count and record size computations to be too high.

If data set mapping is already complete, this table can be temporarily used to disable a new column after a DMSII reorganization to avoid recloning. (This is done automatically if the configuration file parameter suppress_new_columns is set to True.)

If you want to disable cloning for every data item in a data set (every column in a table), disable cloning for the data set instead of disabling cloning for each individual data item. For details, see DATATABLES Client Control Table.

The following table contains descriptions of each column in the DATAITEMS client control table. Included is the abbreviated column name that the display command writes to the log file.

Column

Display

Description

data_source

 

This column contains the name of the data source that identifies the DMSII database from which the data was taken.

table_name

table

This column contains the name of the table in the relational database to which this item belongs.

item_number

#

This column contains an internal number that gives each item within a table a unique number. Numbers are assigned consecutively in increments of 10, starting with 10, making it easier to change the order of items using data table customization user scripts.

item_name

item_name

This column contains the name of the item (column) in the relational database table. Typically, this is the same as the lowercase form of the DMSII item name with all dashes changed to underscores. To modify, see Appendix D: Customization Scripts.

active

A

The value in this column specifies whether or not this data item will be cloned. The default is 1, which indicates that the data item will be cloned. 0 indicates that the data item will not be cloned. The define and redefine commands change the value in the active column to 0 if the data set contains global database information.

Note: If the active value for the data set to which this item belongs is 0 (off), this item will not be cloned even if its active value is 1 (on).

item_key

iK

This column contains a numeric value specifying the order of the item in the DMSII set (10, 20, 30, and so on). You can edit this column to make it part of a composite key. For details, see Creating Indexes for Tables. If the item is not a key, the value is zero (0).

virtual_key

VK

Do not change this value.

This column contains a Boolean value specifying if this item is a virtual key; however, it is created only for mapping DMSII items with unflattened OCCURS clauses. When an item is a virtual key, the corresponding value for item_key is a positive number that is one greater than the item_key value of the last key for the data set. The virtual key is not a DMSII key—its value in the data table is the occurrence number in the occurs clause (starting at 1).

dms_item_number

I#

This column contains the item number, which indicates the relative position of the item in the original DMSII record.

dms_parent_item

P#

This column contains the dms_item_number of the parent item for an item that is a member of a GROUP item. For example, if dms_item_number 12 is a DMSII GROUP containing items 13, 14, 15, and 16, the dms_parent_items of the last four items is 12. This column This column contains a copy of the dms_subtype in the DMS_ITEMS table.

dms_item_type

TYP

For a description of this column, see "dms_item_type" in DMS_ITEMS Client Control Table.

In addition to the types defined in DMS_ITEMS, this column contains the following values:

Type

Description

256

AA value or RSN, which the DATABridge Client generates using the AA value or RSN of the record in the DMSII database as received from DBEngine. You can tell them apart by looking at the item_name column, which is my_aa for AA values and my_rsn for RSNs.

257

Parent AA, which the DATABridge Client generates using the AA value of the parent record of an embedded data set in the DMSII database as received from DBEngine.

258

External type, which indicates that the data comes from some place other than the DMSII database.

dms_decl_length

DL

This column contains the user-declared length of the item in the DMSII DASDL. This length changes according to the data item type selected (alpha, Boolean, field, number, or real).

dms_scale

SC

This column contains the numeric scaling factor, which is the number of digits to the right of the decimal place, if any.

dms_offset

OFF

This column contains the item’s offset value which indicates where, within the DMSII record, this item begins. This is the location DATABridge uses to extract data from DMSII records. For example, in a 400-byte record with an offset of 200, the first 100 bytes are used by other items. This number is in digit size, which is equal to one-half of a byte (four bits).

dms_length

LEN

This number is the digit size of the data. Digit size is equal to one-half of a byte (four bits).

dms_signed

s

This column contains a Boolean value specifying whether the item is signed or unsigned as follows: 0 = unsigned and 1 = signed.

dms_num_occurs

OCC

This column indicates the number of times this data item occurs (is present) within the data set. If the item does not have an OCCURS clause, this value is 0.

sql_type

TY

This column contains the relational database data type that corresponds to the DMSII data types. See DMSII and Relational Database Data Types.

sql_length

LEN

If the data type for the column has a length specification in the relational database, this column specifies the length to be used. For example, in the case of char(5) the sql_length is 5.

Conversely, if the data type for the column does not have a length specification in the relational database (for example, "int" in SQL Server or "date" in Oracle) this column has a value of 0.

occurs_level

OLV

This column contains the nesting level of OCCURS in the DMSII database. For example, an OCCURS table created from another OCCURS table has an occurs_level of 2. The original OCCURS table has an occurs_level of 1.

dms_subtype

STY

For items mapped to relational database date types, this column contains the format of the date as it is stored in the DMSII database. These are not actual DMSII data types; rather, they represent the formats of dates that might be stored as a DMSII GROUP, a NUMBER, or an ALPHA item. For non-DMSII columns this column identifies the type of the non-DMSII column.

sql_scale

SC

This column contains a copy of the dms_scale that you can edit. This value is used in the relational database to specify the scale for columns of whose data type is DECIMAL(p,s) on SQL Server or NUMBER(p,s) on Oracle.

dms_depends_num

dep

This column contains the dms_item_number of the item that specifies the number of occurrences in use for an item with an OCCURS DEPENDING ON clause.

da_options

 

OP

 

The following bits, which you can set through data table customization user scripts, enable you to specify additional properties of the data items:

Bit

Description

1

DAOPT_Nulls_Allowed - This bit is set by the define and redefine commands based on the value of the configuration parameter allow_nulls. You can later change this value via user scripts. A value of 1 indicates that the item will be created with the attribute of NULL (except in Oracle where this is the default attribute of a column).

2

DAOPT_Column_Renamed - The column was renamed by the user. This column is only only by the Client Configurator.

4

DAOPT_Type_Changed - The SQL type of the column was changed by the user. This column is only only by the Client Configurator.

8

DAOPT_Length_Changed - The SQL length of the column was changed by user. This column is only only by the Client Configurator.

16

DAOPT_Scale_Changed - The SQL scale changed by user. This column is only only by the Client Configurator.

32

Reserved.

64

Reserved.

128

DAOPT_Item_Renumbered - The item number (that is, the location of the column) was changed by the user. This column is only only by the Client Configurator.

256

Reserved.

 

 

512

DAOPT_Store_as_Char - This bit indicates that the item, which is numeric, should be stored in the relational database as a character data type.

1024

DAOPT_Xlate_Binary - This bit determines whether or not character data gets translated from EBCDIC to ASCII before being stored as binary. This bit is copied from the DIOPT_Xlate_Binary bit in the DMS_ITEMS table as the process and clone commands do not load the DMS_ITEMS table.

2048

DAOPT_Store_as_Number - Indicates that the Client is storing the corresponding ALPHA data using the appropriate numeric data type.

4096

DAOPT_VarFormat_Date - Indicates that the dms_subtype column contains a mask describing the date format.

8192

DAOPT_FixAlphaChar - This bit applies to data items whose data type is ALPHA, and it indicates that the Client will scan the data for control characters and replace each control character with a space.

You can set this bit via a user_define script, or you can set it globally via the convert_ctrl_char parameter. See convert_ctrl_char.

Caution: Do not set the convert_ctrl_char parameter to True unless you are absolutely certain that eliminating control characters will have no adverse effect on the data. For example, eliminating control characters can cause some fields to be misinterpreted.

16,384

 

DAOPT_ActiveReset – Internal use only. This bit indicates that the active column of items was set to zero by the client. This happens for concatenated items, which must be present to access the data and are otherwise not processed.

 

 

changes

 

 

These bits are used by the redefine command.

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

dms_link_ds_num

 

This column holds the structure number of the data set to which a LINK item points. Thus a nonzero value in this column identifies a DMSII LINK. Links that use AA values have a dms_item_type value of (10).

dms_concat_num

 

This column is a copy of the DMS_ITEMS column of the same name and is automatically set by the define and redefine commands since the DMS_ITEMS table is not loaded during a process or clone command. Do not modify this column in your user scripts.

da_user_bmask

 

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