Defining masks for transformation rules

A mask string for a transformation rule can contain:

Literal characters
Matches the characters exactly as typed, except that, for fields that require uppercase values, lowercase characters are converted to uppercase.

You cannot specify an asterisk (*), a plus sign (+), or an ampersand (&) as a literal character.

Asterisks (*)
An asterisk is a multiple-character wildcard: it matches zero, one or more characters. You can specify up to two asterisks in a mask. You can specify a single asterisk at the start, middle, or end of the mask. If you specify two asterisks, they must be at the start and end of the mask.
Plus signs (+)
A plus sign is a single-character wildcard: it matches any single character. You can specify any number of plus signs in a mask.
Transformation variables
Matches the value of the transformation variables defined in the CICSĀ® configurations or the migration scheme.

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.

<BLANK> or <blank>
Specifies a null value. For example, you can use <BLANK> as a "to" mask value to change a field value to a null. If you specify <BLANK> or <blank> for an encoded field (one that has a fixed list of values), then the default value for that field is assumed.

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.

Table 1. Example transformation rule masks
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