A mask string for a transformation rule can contain:
You cannot specify an asterisk (*), a plus sign (+), or an ampersand (&) as a literal character.
To refer to a transformation variable in a mask, you precede the variable name with an ampersand, and follow the name with a period. For example, if the variable name is HLQ, then you refer to it like this:
&HLQ.
You can omit the trailing period if the variable name is followed immediately by an asterisk (*) or a plus sign (+), or if the variable name ends the mask.
CICS Configuration Manager does not resolve nested variable names in the variable value. Any ampersands (&), asterisks, or plus signs in the variable value are treated as literals.
If a mask refers to an undefined variable, CICS Configuration Manager does not migrate the change package and reports an exception.
You can achieve the same effect with a transformation variable. For example, define a variable named NULL in the migration scheme, but do not provide a source value or a target value. Then specify &NULL. as the "to" mask.
If the field being transformed is an encoded field, you must provide a specific value for the "to" mask (no wildcards allowed).
You can mix literals, variables, asterisks, and plus signs in the same mask.
Mask | Example field values | Effect | ||
---|---|---|---|---|
From | To | Original | Transformed | |
ABC | XYZ | ABC | XYZ | Replace ABC with XYZ |
ABCD | Unchanged (field does not match the "from" mask) | |||
ABC | <BLANK> | ABC | Null | Replaces ABC with a null value. |
&LEVEL | &LEVEL | 1 | 2 | Replace the source value of the variable LEVEL, 1, with its target value, 2 (the source value is defined in the source CICS configuration or the "source" column of the migration scheme; the target value is defined in the target CICS configuration or the "target" column of the migration scheme) |
3 | Unchanged (field does not match the source value of the variable LEVEL) | |||
ABC* | * | ABCDEF | DEF | Remove ABC prefix |
X* | ABCD | XD | Replace ABC prefix | |
XYZ* | ABCDEF | XYZDEF | ||
*DEF | * | DEFGH | Unchanged (field does not end in DEF) | |
DEF | Blank | |||
ABCDEF | ABC | Remove DEF suffix | ||
*X | DEF | X | Replace DEF suffix | |
ABCDEF | ABCX | |||
*XYZ123 | DEF | XYZ123 | ||
ABCDEF | ABCXYZ123 | |||
*ABC* | ** | 123ABCDEF | 123DEF | Remove first occurrence of "ABC" |
ABC | Blank | |||
1AB3 | Unchanged | |||
*XYZ | 123ABCDEF | 123XYZ | Replace from first occurrence of "ABC" onwards | |
XYZ | 123ABCDEF | XYZ | Replace first occurrence of "ABC" with "XYZ", and delete any characters before and after | |
ABCDEF | XYZ | |||
123ABC | XYZ | |||
ABC | XYZ | |||
A | Unchanged | |||
*XYZ456 | 123ABCDEF | 123XYZ456 | Replace from first occurrence of "ABC" to end of field with "XYZ456" | |
AB*EF | XYZ*JKL | ABCDEF | XYZCDEF | Replace "AB" prefix with "XYZ", and replace "EF" suffix with "JKL" |
ABEF | XYZJKL | |||
ABCDE | Unchanged | |||
*JKL | ABCDEF | CDJKL | Remove "AB" prefix, and replace "EF" suffix with "JKL" | |
XYZ* | ABCDEF | XYZCD | Replace "AB" prefix with "XYZ", and remove "EF" suffix | |
AB+DE | + | ABCXDE | Unchanged (there must be one, and only one, character between AB and DE) | |
ABDE |