PMDF System Manager's Guide


Previous Next Contents Index


test -mapping

Test a mapping table in the mapping file.

Syntax

pmdf test -mapping [input-string]

Command Qualifiers Defaults
-flags=list-of-characters -noflags
-image_file -image_file
-mapping_file=file-spec -mapping_file=PMDF_MAPPING_FILE
-option_file=file-spec -option_file=PMDF_OPTION_FILE
-table=table-name None

restrictions

None.

prompts

Enter table name: table-name

Parameters

input-string

Optional input string to map.

Description

pmdf test -mapping may be used to test the behavior of a mapping table in the mapping file. The string resulting from mapping an input string will be output along with a list of any metacharacters specified in the output string.

If an input string is supplied on the command line, then only the result of mapping that input string will be output. If no input string is specified pmdf test -mapping will enter a loop, prompting for an input string, mapping that string, and prompting again for another input string. pmdf test -mapping will exit when a CTRL/D (UNIX) or CTRL/Z (NT) is entered.


Command Qualifiers

-flags=list-of-characters

-noflags

The -flags qualifier is used to specify particular flags to set during the mapping testing; for instance, the E (envelope), B (header/body), or I (message id) flags when testing a REVERSE mapping.

-image_file

-noimage_file

When the -image_file qualifier is specified (the default), PMDF will load the compiled configuration file PMDF_CONFIG_DATA. When -noimage_file is specified, pmdf test -mapping will unconditionally ignore any compiled mapping information and instead read mapping information from the mapping file itself.

-mapping_file=filename

This qualifier instructs pmdf test -mapping to use the specified mapping file rather than the default mapping file, PMDF_MAPPING_FILE. This qualifier has no effect unless -noimage_file is specified or no compiled configuration exists; use of any compiled configuration will preclude reading any sort of mapping file.

-option_filefilename

-nooption_file

This qualifier instructs pmdf test -mapping to use the specified option file rather than the default option file PMDF_OPTION_FILE. This qualifier has no effect unless -noimage_file is specified or no compiled configuration exists; use of any compiled configuration will preclude reading any sort of option file. Use of the qualifier -nooption_file will prevent the file PMDF_OPTION_FILE from being read in when there is no compiled configuration.

-table=table-name

This qualifier specifies the name of the mapping table to test. If this qualifier is not specified, then pmdf test -mapping will prompt for the name of a table to use.

EXAMPLES


% pmdf test -mapping -noimage_file -mapping_file=/pmdf/table/pager_table.sample
Enter table name: PAGER
Input string: H|From: "Daniel C. Newman" <dan@example.com> (Doof City)
Output string: H|F:dan 
Output flags: [0, 1, 2, 'Y' 89] 
Input string: ^D
% 
      

In the above UNIX example, the sample PAGER mapping is tested. The -mapping_file qualifier is used to select the mapping file pager_table.sample instead of the default mapping file.


C:\> pmdf test -mapping -noimage_file -mapping_file=C:\pmdf\table\mac_mappings.sample
Enter table name: MAC-TO-MIME-CONTENT-TYPES 
Input string: BINHEX|7344424e|4d535744|Test.doc
Output string: APPLICATION/MSWORD 
Output flags: [0, 'Y' (89)] 
Input string: ^Z
C:\>
      

In the above NT example, the sample MAC-TO-MIME-CONTENT-TYPES mapping is tested. The -mapping_file qualifier is used to select the mapping file mac_mappings.sample instead of the default mapping file.


Previous Next Contents Index