Column mapping
Use this screen to map columns between Db2 tables in the following situations:
- Source and target tables have columns that have different names, lengths, or data types.;
- Columns were added to the target table or removed from the source table.;
- Source and target tables match, but source columns need to be mapped to different target columns.
- You want to load Db2 default values for certain fields to protect sensitive data.
- You want to load default literal values for certain fields to protect sensitive data.
For more detailed information about column to column mapping, see Column/Field Mapping Rules.
The body of this screen consists of an upper portion and a lower portion:
Upper Portion
The upper portion of this screen consists of the following fields:
Source Table
Displays the table name from which data was extracted. When loading from a remote location, the table name is in three parts (location.creator.table). Source columns are listed in the Source Columns field.
Target Table
Displays the name of the table to be loaded. When loading to a remote location, the table name is in three parts (location.creator.table). Target columns are listed in the Target Columns field.
Lower Portion
The lower portion of this screen consists of the following columns:
Column Number
Displays a list of File-AID/RDX-generated column numbers that correspond to the columns in the source table. Enter these numbers in the CMD column to map source columns to target columns.
Source Columns
Displays a list of the columns contained in the source table.
Type(Length)
Displays the data type and length for each source column (see Data Type Values).
CMD
Enter a column number in the CMD column next to a target column name to map a source column to that target column. If source and target columns’ names, data types, and lengths match, File-AID/RDX fills in this field automatically.
Blank out this field or leave this field blank if you want default values assigned to the target column when the row is inserted or loaded.
Enter the number (Lnn) of an existing literal definition to assign it directly to a target column, or enter the S line command to access the Default Value Definition screen (SQL Load Option only, see Default Value Definition). Most likely, you will use literal definitions when the extracted table does not contain any values for a particular column or you want to mask certain column fields to protect sensitive data.
For more information about rules that govern column mapping, see Column/Field Mapping Rules.
Target Columns
Displays a list of columns contained in the target table.
Type(Length)
Displays the data type and length for each target column.
Primary Commands
CANCEL (CAN)
Terminates the Column Mapping screen and returns you to the Object Load Specification screen without mapping columns. There are no operands associated with this command.
END
Terminates the Column Mapping screen and returns you to the Object Load Specification screen with column mappings intact. There are no operands associated with this command.
UDTSWAP (UDTS)
Swaps the display for distinct type columns from UDT name to the built-in data type and length and vice versa.
Line Commands
The following line command is valid on this screen:
column-number
Indicates which source column will be mapped to a particular target column. Enter a File-AIDFile-AID/RDX-generated column number (from the Column Number column) in the CMD column next to the target column to which you want to map a source column.
S (Select)
SQL Load Option only. Indicates that you want to set every row to be loaded of the selected column to a literal value. When you press Enter, File-AID/RDX displays the Default Value Definition screen so you can specify the desired value (see Default Value Definition). The literal can be up to 50 bytes long.
Lnn (Literal Definition Number)
SQL Load Option only. Enter a previously defined literal definition number when you know that it contains the desired literal value for the selected column. In that case, File-AID/RDX skips Default Value Definition screen. To view or change the literal value, use the S line command instead. (see Default Value Definition).