To create an IMS data map, you need a database description (DBD) file and a copybook for each segment in the IMS database.
The DBD file defines the database segments and describes the parent-child structure of the segments. The DBD file usually contains the key structure of the segments and the fully concatenated key (CCK) of each segment. During the DBD import process, PowerExchange maps the imported IMS segments and fields to tables and columns to create a relational view of source data that PowerExchange and PowerCenter can use.
The following image shows an example DBD:
After you import a DBD, you need to import a copybook into each segment in the data map to overlay the segment with its COPYLIB. This action redefines the data map while maintaining the hierarchical metadata for the database.
A copybook for a segment contains the structure of the key data and non-key data to describe the physical layout of the data. For an IMS source, you can use a COBOL or PL/I copybook. This article uses a COBOL copybook.
The following image shows an example COBOL copybook:
Informatica recommends that you download the DBD file and copybooks to the Windows system where the PowerExchange Navigator runs before you create a data map. You can then view the files locally and make any necessary modifications without changing the files on the z/OS system. Alternatively, when you create a data map, you can select an option to read the DBD and copybooks from the remote z/OS system and create local copies.
To prepare a COBOL copybook for data map creation use, contact a person at your site who is familiar with the IMS data and how the IMS data map will be used. Ask that person to inspect the data structure defined in each COBOL copybook. Use the following guidelines for this process:
Download the copybook from the z/OS system to the PowerExchange Navigator system, or copy the copybook to a different PDS or member.
Verify that each record in the copybook begins with a 01-level statement.
Merge all of the record definitions for each IMS segment into a single copybook.
Identify potential problem areas:
Verify that duplicate column names do not occur.
If the copybook contains OCCURS…DEPENDING ON clauses, ensure that each DEPENDING ON clause specifies a valid variable name.
Identify fields that contain filter or record selection values for identifying specific segments or records. This information is critical to identifying segments in multiple segment databases.
If you have copybooks with REDEFINES clauses, identify which version of the data to use for the data map. If you have multiple REDEFINES clauses, comment out any that you do not want to use. For each single REDEFINES clause, determine if you want to use the redefined field or group or the original field or group. For example, if a REDEFINES clause redefines a field with a different datatype, determine which datatype to use in the data map.
Add comments for any changes that you make in the copybook.
Save the modified copybooks in a shared LAN directory or in a separate PDS for future reference.