Configuring Data Descriptions

The SNA OLE DB Management Console snap-in is also used to describe the host data file format for mainframe access. Use of the OLE DB Provider MMC snap-in and these host column description files is not required for AS/400 files because by default the data file format is retrieved automatically from the host.

These Data Descriptions are stored in a local host column description (HCD) file for each Data Source.

The general parameters or attributes that can be configured describing each column in a Data Description on the General property page are as follows:

General parameters Description
Name This parameter is the character string that represents the name of the column. This parameter may be null.
Alias This parameter is an optional character string that represents an alias label for the column string name. This parameter may be null.
Comment This parameter is an optional character string that represents a comment about the column. This attribute may be null.

The data type parameters or attributes that can be configured describing each column in a Data Description on the Data Type property page are as follows:

Host parameters Description
Type This parameter indicates the data type on the host. The allowed data values for host data type are selected from a drop-down list box (see Host Data Types for allowed values).
Length This parameter indicates the length of the field in bytes. Depending on the selected Host Type, this parameter may not be editable.
Precision The precision is the total number of decimal digits in the column containing numeric data on the host. Depending on the selected Host Type, this parameter may not be editable.

The only numeric data types that require this information are the PACKED and ZONED data types, and for these types this field cannot be null and must contain a valid numeric value. For all other Host Types selected, this parameter is not editable.

Scale The scale is the number of decimal digits to the right of any decimal point for numeric data on the host. Depending on the selected Host Type, this parameter may not be editable.

The only numeric data types that require this information are the PACKED and ZONED host data types, and for these types this field cannot be null and must contain a valid numeric value. For all other Host Types selected, this parameter is not editable.

CCSID The character code set identifier (CCSID) to be used on the host. The allowed data values for Host CCSID are selected from a drop-down list box (see allowed values listed below).

This parameter defaults to the Host CCSID configured for the OLE DB Provider and is typically U.S./Canada (37) .


Local parameters Description
Type This parameter indicates the OLE DB data type on the local PC. The allowed data values for the local data type are selected from a drop-down list box (see Local OLE DB Data Types for allowed values).

Note that the OLE DB Data provider limits the maximum length character field that can be accessed on an AS/400 machine to 32,745. On mainframes, a limitation of IBM's DFM is that SAM data sets and PDSE members are innaccessible if the fixed record length is greater than 32,760 or variable record lengths are greater than 32,756. DFM also limits all VSAM data sets on a mainframe to have a maximum record length no greater than 32,760. Attempting to access a character field greater than these lengths on an AS/400 or a mainframe machine will fail and can have unpredictable results.

The CCSID setting used by the OLE DB Provider must bet set to match the CCSID actually used on the host otherwise data loss will occur. Note that some AS/400 systems default to a CCSID of 937 for enabling double-byte character sets (DBCS).