Field mapping
The following panel is displayed after you completed the File Mapping Specifications screen. It is the MVS equivalent for the Db2 Column Mapping screen, see also Column Mapping.
Field Mapping
Command ===> SCROLL ===> CSR
Line Commands:
Use Field number to map columns S - Specify Literal Default Values
Blank - For field default value
Source: FR.FRSAMP.INVOICE
CMD Parent Fields Type(Length)
---- ------------------------------- ------------------------------------------
1 IM-INV-NO FIXPIC(6)
2 IM-REC-TYPE CHAR(1)
3 FILLER CHAR(5)
4 IM-CUST-NO CHAR(6)
5 IM-BILL-CUST-NO CHAR(6)
TARGET: TSOID01.SAMP.INVOICE
CMD TARGET Fields Type(Length)
---- ------------------------------- ------------
___1 IM-INV-NO FIXPIC(6)
___2 IM-REC-TYPE CHAR(1)
__17 FILLER CHAR(5)
___4 IM-CUST-NO CHAR(6)
___5 IM-BILL-CUST-NO CHAR(6)
Use this screen to map fields between files in the following situations:
- Source and target objects have fields that have different names, lengths, or data types.;
- Fields were added to the target object or removed from the source object.;
- Source and target objects match, but source fields need to be mapped to different target fields.
- You want to load default literal values for certain fields to protect sensitive data.
For more detailed information about field to field mapping, see Column/Field Mapping Rules.
The body of the Field Mapping screen consists of two portions: a source portion and a target portion.
Source Portion
The upper portion of this screen represents the source information and contains the following fields:
Source
Displays the full name of the source object from which data was extracted.
CMD
Displays File-AID/RDX-generated sequence numbers that indicate the source field numbers to be used as input in the below target CMD field to map the source field to a target field.
Source Fields
Displays the names of the fields in the MVS source file.
Type(Length)
Displays the source field’s data type. The length of the data is displayed in parentheses immediately following the data type for CHAR, CH, VCHAR, VC, GRPH, VGRPH, DEC, FIXPIC, National data types only.
Unicode Db2 character data types are identified as CH(x), VC(x) or LV(x) with a suffix of U16 or U-8. Unicode character data from an MVS file is identified as N(x) U-16.
For more information about data types displayed in this column, see the following table.
Data Type Values
Data Type | Value |
---|---|
CHAR or CH | Fixed-length character strings less than or equal to 254 characters. |
VCHAR or VC | Variable-length character strings less than or equal to the field length specified when the column is created. Maximum allowable field length is 4056 characters for 4k pages and 32,714 characters for 32k pages. |
LVCHAR or LV | Variable-length character strings less than or equal to 4056 characters for 4k pages and 32,714 characters for 32k pages. |
GRPH | Fixed-length graphic strings less than or equal to 127 characters. |
VGRPH | Variable-length graphic strings less than or equal to the field length specified when the column is created. Maximum allowable field length is 2028 characters for 4k pages and 16,357 characters for 32k pages. |
LVGRPH | Variable-length graphic strings less than or equal to 2028 characters for 4k pages and 16,357 characters for 32k pages. |
SMALLINT | Fixed-length, binary integers in the range of -32,768 to +32,767, requiring two bytes of storage. |
INTEGER | Fixed-length, binary integers in the range of -2,146,483,648 to +2,147,483,467, requiring four bytes of storage. |
BIGINT | Fixed-length, binary integers in the range of -9223372036854775808 to 9223372036854775807, requiring eight bytes of storage. |
DEC | Fixed-length, decimal numbers in the range of -10E15 to +10E15. |
DECFLOAT | Decimal Floating Point can be either DECFLOAT(16) or DECFLOAT(34) representing either 16 or 34 significant digits. The range of a DECFLOAT(16) number is 10-383 to 10+384 and the range of a DECFLOAT(34) number is 10-6143 to 10+6144. A DECFLOAT(16) field occupies 8 bytes and a DECFLOAT(34) occupies 16 bytes. |
REAL | Fixed-length, single-precision, floating-point numbers in the approximate range of 5.4E-79 to 7.2E+75. |
DOUBLE | Fixed-length, double-precision, floating-point numbers in the approximate range of 5.4E-79 to 7.2E+75. |
DATE | A three-part value (year, month, day) whose format is determined by Db2. |
TIME | A three-part value (hour, minute, second) whose format is determined by Db2. |
TMSTMP(n) | TIMESTAMP: A seven-part value (year, month, day, hour, minute, second, and precision) whose format is YYYY-MM-DD-HH.MM.SS.TTTTTTTTTTTT. The precision value (TTTTTTTTTTTT) is variable length and has 0 to 12 digits (up to picosecond) with a default of 6 (microsecond). TMSTMP(n) specifies the scale (length) with n = 0 through 12. For Db2 Versions prior to Version 10, the length is always 6. |
TMESTZ(n) | TIMESTAMP WITH TIME ZONE: An eight-part value (year, month, day, hour, minute, second, precision, time zone) whose format is YYYY-MM-DD-HH.MM.SS.TTTTTTTTTTTT±HH:MM. The precision value (TTTTTTTTTTTT) is variable length and has 0 to 12 digits (up to picosecond) with a default of 6 (microsecond). The time zone is the difference in hours and minutes between local time and UTC. The range of the hour offset is -12 to +14, and the minute offset is 00 to 59. The time zone is specified in the format ±th.tm, with values ranging from -12.59 to +14.00. TMESTZ(n) specifies the scale (length) with n = 0 through 12. Db2 Version 10 and higher only. |
CLOB | A character large object (CLOB) is a varying-length string with a maximum length of 2 147 483 647 bytes (2 gigabytes minus 1 byte). |
DBCLOB | A double-byte character large object (DBCLOB) is a varying-length string with a maximum length of 1 073 741 823 double-byte characters. |
XML | A data type for storage of well formed XML documents. |
BLOB | A binary large object (BLOB) is a varying-length string with a maximum length of 2 147 483 647 bytes (2 gigabytes minus 1 byte). |
BINARY | BINARY is a fixed length binary string which extends the support for binary strings beyond BLOBs. Length attribute must between 1 and 255 inclusive. |
VARBINARY | VARBINARY is a variable length binary string which extends the support for binary strings beyond BLOBs. Length attribute must between 1 and 32704. |
ROWID | Row identifier. A value that uniquely identifies a row. If a table contains a large object it must also have a ROWID column. |
HEXADEC | Fixed length string, supported as a string only. |
FLTPIC | Fixed length character string representing a floating point value. |
FIXPIC | Fixed length character string representing a decimal or integer value. |
N (National) | Unicode data from an MVS file in COBOL is identified as PIC N or USAGE NATIONAL. This is UTF-16, CCSID=1200. Identified as N(x) U-16. |
Target Portion
The target portion of the Field Mapping screen contains the following information:
TARGET
Displays the full name of the target object to be loaded with the extracted data.
CMD
Enter a field number in the CMD column next to a target field name to map a source field to that target field. If source and target fields’ names, data types, and lengths match, File-AID/RDX prefills the CMD fields automatically.
Blank out this field or leave this field blank if you want default values assigned to the target field when the record is inserted or loaded.
Enter the number (Lnn) of an existing literal definition to assign it directly to a target field, or enter the S line command to access the Default Value Definition. Most likely, you will use literal definitions when the extracted file does not contain any values for a particular field or you want to mask certain fields to protect sensitive data.
For more information about rules that govern field mapping, see Column/Field Mapping Rules.
Target Fields
Displays a list of fields contained in the target file.
Type(Length)
Displays the data type and length for each target field.
Primary Commands
CANCEL
Terminates the Field Mapping screen and returns you to the Source to Target Mapping without saving your mapping selections. There are no operands associated with this command.
END
Terminates the Field Mapping screen and returns you to the Source to Target Mapping with your specified field mappings intact. There are no operands associated with this command.
Line Commands
The following line commands are valid on this screen:
Field-number
Indicates which source field will be mapped to a particular target field. Enter a File-AID/RDX-generated field number (from the source CMD column) into the target CMD column next to the target field to which you want to map the source field.
S (Select)
Indicates that you want to set every record to be loaded of the selected field 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)
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).
Related topics