PMDF System Manager's Guide


Previous Next Contents Index

5.2 File Format

The mapping file consists of a series of separate tables. Each table begins with its name. Names always have an alphabetic character in the first column. The table name is followed by a required blank line, and then by the entries in the table. Entries consist of zero or more indented lines. Each entry line consists of two columns separated by one or more spaces or tabs. Any spaces within an entry must be quoted; see Section 5.3.1. It is required that a blank line appear after each mapping table name and between each mapping table; no blank lines can appear between entries in a single table. Comments are introduced by an exclamation mark, !, appearing in the first column.

Pictorially, the format that results looks like this:


TABLE-1-NAME
 
   pattern1-1    template1-1
   pattern1-2    template1-2
   pattern1-3    template1-3
     .           .
     .           .
     .           .
   pattern1-n    template1-n
 
TABLE-2-NAME
 
   pattern2-1    template2-1
   pattern2-2    template2-2
   pattern2-3    template2-3
     .           .
     .           .
     .           .
   pattern2-n    template2-n
 
          .
          .
          .
 
TABLE-m-NAME
 
          .
          .
          .
In this example an application using the mapping table TABLE-2-NAME would map the string pattern2-2 into whatever is specified by template2-2. Each pattern or template can contain up to 252 characters. There is no limit to the number of entries that can appear in a mapping (although excessive numbers of entries can eat up huge amounts of CPU and can consume excessive amounts of memory). Long lines can be continued by ending them with a backslash, (\). The white-space between the two columns and before the first column can not be omitted.

Duplicate mapping table names are not allowed in the mapping file.

5.2.1 Including Other Files in the Mapping File

Other files can be included in the mapping file. This is done with a line of the form:


<file-spec
This will effectively substitute the contents of the file file-spec into the mapping file at the point where the include appears. The file specification should specify a full file path (device, directory, etc.). All files included in this fashion must be world readable. Comments are also allowed in such included mapping files. Includes can be nested up to three levels deep. Include files are loaded at the same time the mapping file is loaded --- they are not loaded on demand, so there is no performance or memory savings involved in using include files.


Previous Next Contents Index