A mask is a description of a word, phrase, or number that identifies each character as alphabetic, numeric, or a special character. Masks use the following notation conventions:
A |
Indicates character is an alphabetic letter (a-z or A-Z) |
N |
Indicates character is a numeral (0-9) |
<special_char> |
Represents a special character, such as @, &, %, or punctuation, exactly as it appears in the word or phrase |
A special character (a character that is not a number or a letter) is shown exactly as it appears in the data value, including spaces. Special characters include forward slash (/), at symbol (@), percent (%), and so on.
- Example
-
A product code has this value:
1H-3389BD
. The mask for the value isNA-NNNNAA
.In postal addresses, a mask can define any series of five numerals in a ZIP code, instead of entering each of the 99,999 possible combinations in a table. The mask looks like
NNNNN
. If special characters are included, such as for nine-digit ZIP codes, it looks like this:NNNNN-NNNN
.
Masks are used to parse addresses and other data in TS Quality data process functions. They are used in the Transformer Table Recode function and therefore are important if you are working with Quality data files.
- Example
-
If a phone number value is
512 555-1212
, you can recode the value to be (512) 555-1212 by using a mask(NNN) NNN-NNNN
.
You can generate tables of recode masks that you can use with Transformer functions.