In syntax descriptions,

    • Italics  describe values you supply, or are references to other syntax
    • Bold  text describes parts of a mapping string you literally specify
    • [ ]  brackets enclose optional items; the brackets are not literally specified
    • { }  braces group items together; the braces are not literally specified
    • |  or-sign separates alternative; the or-sign is not literally specified
    • -  dashes in syntax names, like command-code, are for readability
    • Dashes are not literally specified unless shown as in bold face Courier font

In a mapping string, individual items are separated from each other by one or more blanks. Within a command-code item that has operands, the command code and its associated operands must have no embedded spaces or other values not part of the syntax, unless these are part of a quoted string operand.

A mapping command is a command used to copy and transform character data found by an SPFLite CHANGE Primary command. These mapping commands are specified in a CHANGE string-2 operand string with a string type code of M.

The string value found by string-1 of the CHANGE Primary command is called the source string.  This value is referenced by some of the mapping commands. It is a read-only value that can be referenced or copied (in whole or in part), but cannot be modified.

The string produced as a result of processing the mapping command is called the result string.  The result string initially is an empty (zero-length) string that is successively built up by process of executing mapping commands.

Mapping commands can be generally divided into two types: copying commands and modifying commands.

  • A copying command copies characters from the source string to the result string, by appending one or more characters from the source string to the right-hand side of the result string.  Sometimes a copying command will copy part of the source string and apply certain types of processing to it, so that the value placed in the result string is not always an exact copy, but may be transformed in some way.

  • A modifying command alters the contents of the result string without reference to the source string.

  • Some modifying commands produce string values copied from some part of the current result string and are appended to the end of it, making the result string longer. Other modifying commands modify the result string in place, but do not change its length. The Delete command D will make the result string shorter, and the Move command M could make the length longer, shorter or unchanged, depending how the value is moved.

When a column reference appears by itself without an associated command code, the column reference is considered a copying command that refers to data in the source string; it requires dot notation to make it refer to the current result string.

The distinction between copying commands and modifying commands affects how column references with dot notation are treated.

See Full Mapping String Documentation for a complete discussion of mapping strings.

Sample Usage with the CHANGE command

CHANGE  R"[A-Za-z]+"  M"4-1"  WORD  ALL

Mappings strings use an M type code, and always appear as string-2 of a CHANGE command. The type code M may appear at beginning or end of string-2, and is case-insensitive. String-1 will normally be a Picture (P) or Regular Expression (R) string type.

Created with the Personal Edition of HelpNDoc: Produce electronic books easily