By definition, the record description is not part of the record I/O architecture in Distributed Data Management (DDM). Traditionally, applications must embed the record format as part of the application program. This creates a tremendous burden on the application and is very inconsistent with the existing PC-based data access standards, such as OLE DB and ODBC.
To solve this problem, the Microsoft® OLE DB Provider for AS/400 and VSAM uses an external Host Column Description (HCD) file stored on the PC that allows administrators to describe the host record format. At run time, the OLE DB Provider for AS/400 and VSAM transparently converts the host data to PC data using the local HCD information. Note that before a user program can view or open a VSAM file using the OLE DB Provider for AS/400 and VSAM, the user program must create a valid record description file or entry for the target VSAM file.
The OLE DB Provider for AS/400 and VSAM includes a Microsoft® Management Console (MMC) snap-in application designed to enable administrators and developers to easily create these local record description files and the necessary registry settings for data sources. The OLE DB DDM Management application makes it relatively easy to create HCD files without ever knowing the HCD file format. The HCD format is documented in the Appendixes.
The conversion process occurs in two steps. The host data is converted from host EBCDIC to PC ASCII data by the DDM DLL. The HCD file is used during this step to convert host data types to C data types defined in ODBC based on the SQL data types defined in the ANSI/ISO SQL-92 standard. The second phase of this conversion occurs in the SNAOLEDB DLL where these SQL C data types are converted to the defined OLE DB data types.
Use of a HCD file is not necessary to describe the record format for data stored in the AS/400. This is because the OLE DB Provider for AS/400 and VSAM DLLs automatically detect that the target host system is an AS/400 and use the appropriate DDM commands to retrieve the record description. If the system administrator or the SNA OLE DB application developer wants to use an HCD file instead of retrieving the AS/400 record description, this behavior can be forced by setting the UseLocalFile registry entry under the Microsoft\SNA OLE DB\Data Sources registry key of SNA OLE DB for that host to a value of 1. This setting is accessible from the Data Source Properties property sheet of the Microsoft Management Console snap-in application described in the next section.