As with the DATASETS table, the DMS_ITEMS table contains entries for each DMSII item as permitted by the DATABridge host support library filters. The DMS_ITEMS table also contains the name of the DMSII data set of which the item is a member, as well as other DMSII layout information.
The following table contains descriptions of each column in the DMS_ITEMS client control table. It also provides the abbreviated column name from the trace.log file when applicable. (This name occurs in the trace.log file when you enter the dbutility display command.)
|
|
|
|
|
|
Column
|
Display
|
Description
|
data_source
|
|
This column contains the name of the data source that identifies the DMSII database from which this data was taken.
|
dataset_name
|
ds
|
This column contains the name of the data set in the DMSII database to which this DMSII item belongs.
|
rectype
|
/type
|
This column, which is zero for all tables mapped from fixed-format data sets, contains the record type of a DMSII variable-format data set. For more information on variable-format data sets, see Variable-Format Data Sets.
|
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.
|
dms_item_name
|
item_name
|
This column contains the name of the data item for the listed data set. This column is limited to 128 characters.
|
active
|
A
|
This column specifies whether or not the item will be mapped. A value of 1 (default) indicates that the item will be mapped (if this is possible) to an entry in the DATAITEMS client control table. A value of 0 indicates that the item will not be mapped. The define and redefine commands change the value in the active column to 0 if the data set contains global database information.
|
item_key
|
K
|
This column contains a numeric value which specifies the order of the item in the DMSII set (1, 2, 3, and so on). If the item is not a key, this value is 0.
Note: You can edit this column to make a composite key. See Creating Indexes for Tables.
|
dms_item_number
|
#
|
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 or GROUP OCCURS 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.
|
dms_item_type
|
T
|
Values 27, 29, and 30 through 37 are DMSII data types.
This column indicates the type of data item, as follows:
|
|
Type
|
Description
|
10
|
DMSII link
|
14
|
Image
|
21
|
variable-format record
|
27
|
Field of Booleans
|
29
|
Group
|
30
|
Boolean
|
31
|
Field
|
32
|
Alpha
|
33
|
Number (n)
|
34
|
Number (n,m)
|
35
|
Real (n)
|
36
|
Real (n,m)
|
37
|
Real
|
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, numeric, or real).
|
dms_scale
|
S
|
This column contains the numeric scaling factor, which is the number of digits to the right of the decimal place, if any.
|
dms_offset
|
O
|
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 bytes, 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
|
L
|
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
|
#O
|
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.
|
dms_num_dims
|
#D
|
This column contains the number of dimensions for the data item, which is the number of subscripts required to access the item.
|
dms_depends_num
|
dep
|
This column contains the item number of the dms_item parameter for the OCCURS DEPENDING ON clause.
|
dms_subtype
|
ST
|
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.
|
di_options
|
OP
|
The following bits, which can be set through data set mapping customization user scripts, enable you to control how the item is mapped.
|
Bit
|
Description
|
1
|
DIOPT_Flatten_Occurs - This bit specifies that the OCCURS clause of the item should be flattened; it is ignored if the item does not have an OCCURS clause.
|
2
|
DIOPT_Clone_as_Date - This bit specifies that the item should be mapped to a relational database smalldatetime date. The format for the encoded date is specified in the dms_subtype column. If you set this bit at the same time as bit 128, bit 128 takes precedence.
|
4
|
DIOPT_Split_Item - This bit indicates that the item should be split into smaller chunks if it cannot be accommodated using a relational database data type (for example, ALPHA(4000) in Oracle). The default is to truncate the item. For example, in Oracle 8.x, the program truncates an ALPHA(4095) item and stores it as varchar2(4000).
|
8
|
Reserved
|
16
|
DIOPT_Clone_as_Tribit - This bit is used to map DMSII number(1) items to a field of three Booleans.
|
32
|
DIOPT_Clone_as_Binary - This bit only affects ALPHA items, and it indicates that items should be mapped to a relational database binary data type, rather than a character type. Items too large to fit in the corresponding binary type are truncated, unless the DIOPT_Split_Item bit is also set, which then maps the item to multiple binary type columns.
|
64
|
DIOPT_Xlate_Binary - When this bit is set, EBCDIC data is translated to ASCII before being stored as binary.
Note: This bit only affects the program when the DIOPT_Clone_as_Binary bit (32) is also set.
|
128
|
DIOPT_Use_LongDate - This bit, which applies to Microsoft SQL Server only, tells the Client to use a datetime data type instead of smalldatetime for the corresponding column in the relational database.
If you are cloning seconds as explained in Unique DMSII Date/Times Represented as ALPHA or NUMBER, set this bit.
|
256
|
DIOPT_Clone_as_Time - Indicates to the Client that the DMSII items should be interpreted as a time and stored on the relational database as an integer type in the form hhmnss except for ticks, which are stored in the form ddddhhmnss.
|
512
|
DIOPT_Numeric_Data - This bit, which applies to DMSII ALPHA types only, indicates to the Client that the item contains numeric data and should be mapped to a numeric type on the relational database.
|
1024
|
DIOPT_AlphaNumData - This bit, which applies to DMSII NUMBER types only, indicates to the Client that the item should be mapped to a character type on the relational database.
|
2048
|
DIOPT_ VarFormat_Date - This bit specifies that the item should be mapped to a relational database smalldatetime date, using a unique encoding scheme. This bit requires that you also set DIOPT_Clone_as_Date (2).
The format for the encoded date is specified in the dms_subtype column, using the instructions for Unique DMSII Date/Time Formats Represented as Alpha or Number Items.
Also set bit 128 if you are cloning a value for seconds (hexadecimal value 7) from the host.
|
4096
|
DIOPT_FlatSecondary - This bit specifies whether occurring items in the secondary table are flattened into a single row, or placed in multiple rows for each parent record.
|
8192
|
DIOPT_Clone_as_RSN - This bit indicates whether the item should be treated as an RSN. This bit only applies to items of type REAL. When this bit is set, the client treats the A-Series word (represented as a REAL) the same way it treats AA Values and RSNs supplied by the Engine. In this case, REAL items are mapped to a column of type CHAR(12) in the relational database. Note that the configuration file parameter use_binary_aa has no effect on such items. Instead, the DIOPT_Clone_as_Binary bit in di_options must be used to cause this RSN to map to a column of type BINARY(6) in the relational database.
|
16384
|
DIOPT_Clone_as_Number - This bit causes columns containing RSNs to be handled as numeric AA values.
|
32768
|
DIOPT_Clone_as_DateOnly - This bit causes the define and redefine commands to use the data type of date instead of smalldatetime. This bit is ignored if either DIOPT_UseLongDate or DIOPT_UseLongDate2 is set. This bit is only applicable to SQL Server 2008. If you use an earlier version of SQL Server, it is treated as a request to use the data type smalldatetime.
|
65536
|
DIOPT_Use_LongDate2 - This bit causes the define and redefine commands to use the data type datetime2 instead of smalldatetime. If both this bit and DIOPT_UseLongDate are set, this bit takes precedence. This bit is only applicable to SQL Server 2008. If you use an earlier version of SQL Server, it is treated as a request to use the data type datetime.
|
131072
|
DIOPT_Use_Time - If DIOPT_Clone_as_Time bit is specified, this bit causes the define and redefine commands to use the data type of time instead of a numeric time type. This bit is only applicable to SQL Server 2008; it has no effect on earlier versions of SQL Server.
|
dms_concat_num
|
|
Using this column, the client supports concatenating two non-contiguous columns of the same data type (that is, treat two columns as one). You can concatenate two ALPHA items, or two unsigned NUMBER items. You can also use the client to store a numeric item as ALPHA and then use the item in a concatenation. You can also store an ALPHA item that contains numeric data as an unsigned NUMBER and concatenate it with an unsigned number.
Currently this is only supported for unsigned numeric columns that represent a date and a time. The date can be any of the supported date formats, while the time must be a NUMBER(6) containing the time as HHMISS. The combined NUMBER can then be interpreted by the client as date/time time. For an example of the layout scripts see Numeric Date and Time in Non Contiguous Columns.
|
changes
|
These bits are used by the Client Configurator (not 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
|
16
|
CHG_dms_item_key - This bit indicates that value in the item_key column of the entry has changed.
|
32
|
CHG_dms_item_type - This bit indicates that the DMSII data type of the item changed.
|
64
|
CHG_dms_decl_length - This bit indicates that the value in the dms_decl_length column of the entry has changed.
|
128
|
CHG_dms_scale - This bit indicates that the value in the dms_scale column of the entry has changed.
|
256
|
CHG_dms_signed - This bit indicates that the value in the dms_signed column of the entry has changed.
|
dms_link_ds_num
|
lnk
|
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).
|
di_user_bmask
|
|
This column, which shadows the di_options column, contains a bit mask that represents the columns in di_options that were customized. This column is used by the redefine command to restore the portion of di_options that has been customized while leaving the remaining bits intact.
|