The COLUMN object contains metadata about a column or field in a source table, target table, or file. It is associated with a TABLES object (see TABLES object).
Table 59 provides information about the properties of the COLUMN
object.
Table 59. Properties of the COLUMN object
Tag language property name | Description | Allowed values |
---|---|---|
NAME | The name of the column or field.
The combination of the database name, table name, and column name is unique. | A text string, up to 80 bytes in length. |
SHRTDESC | The short description of the column or field. | A text string, up to 200 bytes in length. |
LONGDESC | The long description of the column or field. | A text string, up to 32700 bytes in length. |
DATATYPE | The ODBC data type to which the database manager data type maps.
The Data Warehouse Center derives the data type from the native data type. You cannot add a GRAPHIC data type column to a table in a VSAM database. | One of the following values:
CHAR NUMERIC DECIMAL INTEGER SMALLINT FLOAT DOUBLE DATE TIME TIMESTAMP VARCHAR LONG_VARCHAR GRAPHIC VARGRAPHIC LONG_VARGRAPHIC BLOB CLOB DBCLOB TINYINT BIT REAL BIGINT |
LENGTH | The length of the column or field. | A numeric value. |
SCALE | The precision of the column or field for columns or fields with a decimal data type. | A numeric value. |
POSNO | An index, starting with 0, of the column or field in the row of the table or file. | A numeric value. |
NULLS | A flag that specifies whether the column or field allows null data. | One of the following values:
|
ISTEXT | A flag that specifies whether the column or field data is binary or text data. | One of the following values:
|
DBNAME | The business name of the source or target that contains this table or file. | A text string, up to 80 bytes in length. |
OWNER | The owner, high-level qualifier, or collection of the table.
This property is null for files and IMS segments. | A text string, up to 15 bytes in length. |
TABLES | The physical table, file, or segment name as defined to the database
manager or file system.
For files and IMS segments, this value is the same as the value of NAME. | A text string, up to 80 bytes in length. |
NATIVEDT | Native data type of the column or field. | The data type for the column as defined to the database manager.
The data type is a text string, up to 40 bytes in length. In most cases, the value of this property will match the value of DATATYPE. For the mapping of the database manager data types to ODBC data types, see the Data Warehouse Center online help. |
ORDINAL | Column or field ordinality. | A numeric value. |
OFFSET | The offset of the field in a fixed-length file. | A numeric value. |
COLTYPE | The column type for DPropR. | One of the following values:
|
Figure 20 shows an example of a COLUMN object instance.
Figure 20. COLUMN object instance
:ACTION.OBJINST(MERGE) :OBJECT.TYPE(COLUMN) :INSTANCE. NAME(CORR_COEF) SHRTDESC(Correlation Coefficient) DATATYPE(DOUBLE) LENGTH(0) SCALE(0) POSNO(4) NULLS(Y) ISTEXT(N) DBNAME(TRANSFORMER_TARGET) OWNER(IWH) TABLES(TR_CORRELATION_06) COLUMNS(CORR_COEFF) NATIVEDT(DOUBLE) TRANSNAM(Correlation Coefficient(r)) |
Table 60 shows the relationship in which the COLUMN object
participates. This relationship is useful for partner applications. The
Source column and the Target column indicate how many times the source object
or the target object of the relationship can participate in the
relationship.
Table 60. Relationship in which the COLUMN object participates
Source | Source tag language object type | Relation type | Target | Target tag language object type | Description |
---|---|---|---|---|---|
1 | TABLES | CONTAIN | M | COLUMN | The table with which this column is associated. |
Figure 21 shows an example of a relationship between a COLUMN object instance and a TABLES object instance.
Figure 21. Linking COLUMN object instance to TABLES object instance
:COMMENT. Relation: TABLES to COLUMN :COMMENT. :ACTION.RELATION(ADD) :RELTYPE.TYPE(CONTAIN) SOURCETYPE(TABLES) TARGETYPE(COLUMN) :INSTANCE. SOURCEKEY(DBNAME(TBC Operations) OWNER() TABLES(d:\iwhdemo\outcusti.txt) ) TARGETKEY(DBNAME(TBC Operations) OWNER() TABLES(d:\iwhdemo\outcusti.txt) COLUMNS(Zipcode) ) |