This element contains information on which file-specific character sets openFT is to use and on which files are to be encoded with which character sets. A range of character sets in the form of code tables are supplied with openFT. See also section “Administering code tables”.
The character set is selected by means of the name of the send or receive file. If openFT-AC is used, the file name may consist of the specification from the transfer request and from the admission profile accessed in the transfer request.
Each line of the member must contain one of the following specifications:
the name of the character set (code table) in the following format:
@ctabname [comment]
ctabname is the name of the code table (1 to 8 characters, also known as the CCS name).
a selection pattern for selecting file names where the "*" character can be used as a placeholder for a part of the file name; the "*" character may only be used once in a selection pattern. It stands for an optional number of characters (including 0 characters).
The following rules must be observed when creating the member FNAMECTB:
There must be no blank between "@" and the name of the character set.
A line containing the name of a character set may be followed by one or more lines with selection patterns for file names. All files whose names match one of the selection patterns are allocated to that character set.
A table name to which no selection pattern is allocated is skipped.
If a table name is specified several times, the character set is loaded several times; all specified allocations to selection patterns are considered.
If a selection pattern is specified more than once, the first allocation applies.
If a file name matches several selection patterns, the first hit applies. More specific selection patterns must therefore be located before a more general selection pattern.
Leading blanks in a line are ignored so that the allocation specifications can be clearly structured.
All lines up until the first occurrence of a table name are treated as comment lines.
At the end of each line, a comment can be included, separated by at least one blank from the rest of the line.
File name patterns not enclosed in single quotes ignore the first-level qualifier if the files are not openEdition files.
Example for the pattern *A.TEXT:
'USERA.TEXT'
does not match, because the A is part of the first-level qualifier
'USER1.AAA.TEXT'
matches
’/AAA.TEXT’
matches, because it is an openEdition file
openFT assigns a table ID to each code table that is loaded. A list of all code tables is entered into the openFT job log; the table IDs and the allocated selection patterns for file names are also listed there for each code table. Incorrect specifications in FNAMECTB and errors that occur when a table is loaded are indicated by means of a negative number as table ID. The individual values have the following meanings:
Table ID | Meaning |
-1 | Syntax error in the selection pattern specification |
-2 | Code table could not be loaded |
-3 | Syntax error in the specification of the name of a code table, for instance a blank |
Errors that occur when the member FNAMECTB is read in are not logged; the allocation list that was created up until the first error occurred is used.
Example for the member FNAMECTB
In this example, the possible entries (including some erroneous entries) in the member FNAMECTB are presented along with effect and including the entries in the openFT job log which they generate.
THIS MEMBER DEFINES FILE SPECIFIC CODE TABLES FOR OPENFT @FNCOD001 - SPECIAL TABLE 1 'USER1.*.TEXT' @FNCOD002 - SPECIAL TABLE 2 'USER2.ABC*' 'USER2.*ABC' *TEXT* 'USER3.DEF' @IBM037 - EBCDIC CODE PAGE 037 *.TEXT @IBM273 - EBCDIC CODE PAGE 273 DEF @IBM500 - EBCDIC CODE PAGE 500 *.CHAR @FNCODTABL XYZ* @ FNCOD000 *CHAR @UTF8 *.tst
The resulting entries in the openFT job log:
TABLE_ID CODETABLE PATTERN 0014FE00 FNCOD001 'USER1.*.TEXT' > (1) 0014FC00 FNCOD002 'USER2.ABC*' > (2) 0014FC00 FNCOD002 'USER2.*ABC' > (3) -1 FNCOD002 *TEXT* > (4) 0014FC00 FNCOD002 'USER3.DEF' > (5) 0014FA00 IBM037 *.TEXT > (6) -2 IBM273 DEF > (7) 0014F800 IBM500 *.CHAR > (8) -3 FNCODTAB XYZ* > (9) -3 FNCOD00 *CHAR > (10) 001E445F UTF8 *.tst > (11)
Explanations
(1) | All files with the first level qualifier USER1 whose names end with ".TEXT" are coded using the character set FNCOD001. |
(2) | All files with the first level qualifier USER2 whose partially qualified names begin with "ABC" are coded using the character set FNCOD002. |
(3) | All files with the first level qualifier USER2 whose names end with "ABC" are also coded using the character set FNCOD002. |
(4) | Syntax errors in the specified selection patterns: the "*" character is used several times. |
(5) | The file 'USER3.DEF' is also coded using the character set FNCOD002. |
(6) | All files whose names end with ".TEXT" are coded using the character set IBM037 (except those whose first level qualifier is USER1, see (1)). |
(7) | All files with a partially qualified name DEF (except 'USER3.DEF' - see (5)) are to be are coded using the character set IBM273, but this table cannot be loaded, for instance because it has been deleted from the library. |
(8) | All files whose names end with ".CHAR" are coded using the character set IBM500. |
(9) | Syntax errors in the specification of the name of the code table: Name longer than 8 characters. Note: This entry is to capture all files whose partially qualified name begins with "ABC" but with the exception of the files whose first level qualifier is USER2 - see (2). |
(10) | Syntax errors in the specification of the name of the code table: There is a blank between "@" and the name of the code table. - Note: This entry is to capture all files whose names end with "CHAR" with the exception of the files whose names end with ".CHAR" - see (8). |
(11) | All files with names ending in ".tst" are encoded using the UTF8 character set. |