Use this field-level keyword to specify the name of a translation table to be used when passing this field between the physical file on the PFILE or JFILE keyword and your program.
The field must be a character field and its length cannot be redefined in the logical file. If the TRNTBL keyword is specified with the CONCAT keyword, the fields specified on the CONCAT keyword must all be character fields.
TRNTBL([library-name/]translation-table-name)
The translation-table-name is a required parameter value; the library-name is optional. If you do not specify the library-name, the operating system uses the library list (*LIBL) that is in effect at file creation time.
The translation-table-name cannot name an ICU table.
This keyword is valid only for character fields that are input-only (I specified in position 38) or neither (N specified in position 38) fields.
You cannot specify the TRNTBL keyword on a hexadecimal field (H in position 35). Do not specify the TRNTBL keyword on a date, time, or timestamp field (L, T, or Z in position 35).
You can specify as many as 99 different translation tables for different fields in the same logical file.
Translation occurs when the field is read from the physical file. Therefore, all functions specified in the logical file (such as key field sequencing, select/omit processing, and joining of records) depend on the translated version of the data.
The TRNTBL keyword changes the data in the records returned from the logical file. The ALTSEQ keyword changes only the order of the records returned from the logical file.
The TRNTBL keyword is not valid when you specify FILETYPE(*SRC) on the Create Logical File (CRTLF) command.
The following example shows how to specify the TRNTBL keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RECORD1 PFILE(PF1) 00020A CHAR1 I TRNTBL(LIB1/TBL1) 00030A CHAR2 A I TRNTBL(LIB2/TBL2) 00040A NUM1 00050A NUM2 A
Field CHAR1 is translated using table TBL1 in library LIB1. Field CHAR2 is translated using table TBL2 in library LIB2. Field CHAR2 was redefined in the logical file as a character field (A in position 35) to allow the TRNTBL keyword to be specified. Fields NUM1 and NUM2 are numeric fields in the physical file PF1 and cannot have the TRNTBL keyword specified for them.