Information Catalog Manager Programming Guide and Reference

FLGMdisImport

Imports metadata from a file that conforms to the Metadata Interchange Specification (MDIS) into the Information Catalog Manager. The information catalog into which you import MDIS metadata must include, but is not limited to, valid MDIS object type definitions. Appendix B of the Information Catalog Manager Administration Guide describes the Information Catalog Manager predefined object types and how they map to MDIS.

Authorization

Administrator

Syntax



APIRET  APIENTRY   FLGMdisImport( PSZ              pszTagFileID,
                                  PSZ              pszLogFileID,
                                  PFLGEXTCODE      pExtCode );

Parameters

pszTagFileID (PSZ) -- input
Identifies the tag language file. This parameter is required.

This parameter contains the drive, directory path, and file name, and must be valid for a FAT or HPFS file. The drive cannot be a removable drive. The file name and extension, excluding the drive and directories, cannot exceed 240 characters. If you type only the file name, the Information Catalog Manager assumes that the tag language file is on the drive and path pointed to by the DGWPATH environment variable.

The file identified by pszTagFileID contains the MDIS-conforming metadata to be imported.

pszLogFileID (PSZ) -- input
Specifies the location and name of the log file. This parameter is required.

This parameter contains the drive, directory path, and file name, and must be valid for a FAT or HPFS file. The drive cannot be a removable drive. If you specify only a file name, the Information Catalog Manager places the log file on the drive and path pointed to by the DGWPATH environment variable.

If the log file specified in this parameter does not exist, a new file is created. If the log file specified in this parameter already exists, then the Information Catalog Manager appends to it.

The file identified by pszLogFileID contains logging information as well as warnings and errors detected during processing of the FLGMdisImport API call.

pExtCode (PFLGEXTCODE) -- output
Points to an extended code associated with the reason code. See Appendix D, Information Catalog Manager reason codes to see if a meaningful extended code is associated with the returned reason code.

Reason code (APIRET)
Represents the execution result of this API call.

See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.

Usage

Setting the MDIS environment

Before running MDIS import, set the MDIS environment variable:

SET MDIS_PROFILE=X:\SQLLIB\METADATA\PROFILES

where X is the drive where DB2 UDB is installed.

Note to those currently using MDIS with other products and Visual Warehouse 3.1: If you already had MDIS configuration and profile files, the DB2 UDB nstallation program did not overwrite them. However, before you use the MDIS function of the Information Catalog Manager for the first time, you must merge the information in the Information Catalog Manager MDIS profile and configuration files with your existing files. Complete the following steps:

  1. Check the MDIS environment variable setting to locate your existing MDIS profile file (MDISTOOL.PRO) and configuration file (MDISTOOL.CFG).
  2. Using a text editor, append the contents of X:\SQLLIB\METADATA\PROFILES\MDISTOOL.PRO to your existing profile file. (X is the drive where you installed DB2 UDB.)
  3. Using a text editor, append the contents of X:\SQLLIB\METADATA\PROFILES\MDISTOOL.CFG to your existing configuration file. (X is the drive where you installed DB2 UDB.)

Debugging MDIS import errors

The Information Catalog Manager creates a log file when importing an MDIS-conforming file.

The log file records what happens during the import process. It includes the times and dates when the import process started and stopped. It also includes any warning or error messages for problems that occur during the process. The log file is identified by the pszLogFileID parameter.


[ Top of Page | Previous Page | Next Page ]