A Column Map provides specifications needed to direct data from source columns to destination columns, match pairs of columns from separate tables for a Compare Process, or exclude columns from processing. You can use a Column Map for a pair of tables regardless of Creator ID or table name.
For example, a Column Map defined to map columns in a table named FOPDEMO.CUSTOMERS to those in a table named TEST.CUSTOMERS can also be used to map the identical tables PROD.CUSTOMER1 and QA.CUSTOMERS.
A Convert, Insert, Load, Restore, or multi-table Compare Process requires a Table Map, which may reference one or more Column Maps. A Compare Process for a single table comparison may reference a Column Map directly. Column Maps stored in the Optim Directory are available for reuse or sharing with other users. A local Column Map is stored as part of a Table Map or Compare Request and is otherwise not available.
A Column Map must be used when column names or attributes do not match, when data transformations are needed, or when one or more columns are excluded from processing. A Column Map used in a Convert, Insert, Load, or Restore Process can modify data. In a Convert, Insert or Load Process a Column Map can age dates. Advanced methods allow you to split data from one table into several tables or copy one source column to several destinations. Column Maps also allow you to create a single destination table from the data in a joined view. Be aware of this restriction: A table can be referenced only once as the destination; thus, you cannot enter the names of both a table and one or more synonyms, views, or aliases for the table as a destination table. Also, a Column Map cannot transform data during a Compare Process.
For data transformations that are beyond the capacity of a Column Map, you can specify an exit routine, column map expression, or local column map procedure. (Exit routines, programs written in Assembler, VS COBOL II, PL/I, or C programming language, are discussed in Exit Routines for Source Column Values - Optim v7.2 and earlier.) Column map expressions and procedures using Lua functions are discussed in Working with column map expressions and procedures using Lua functions.
Column Maps provide great control and flexibility for Archive, Move, and Compare Processes. For example, you can use a Column Map to bypass selected source columns for one process and a different Column Map to incorporate those columns in a different process.
Compare Column Maps can be used with Archive and Move Processes; however, Column Maps that modify data cannot be used with Compare.
Typically, in Archive and Move processing, source values are derived from the source columns. A Column Map, however, allows you to modify data and specify a variety of values for the destination. You can:
A Legacy Table, used with Move or Compare for IMS, VSAM, and Sequential Files, describes legacy data for use with Optim. You can apply a Column Map to columns (fields) in a Legacy Table as though it were a DB2 table.
For Compare processing, Column Maps allow you to pair Source 1 and Source 2 columns with dissimilar names or compatible data types and exclude specific columns from the Compare Process. Also, you can match dissimilarly named columns from two source tables for a Match Key definition. A Column Map used in a Compare Process cannot modify data.