You can use the TRANS NID function to mask United Kingdom National Insurance Numbers (NINO).
A NINO consists of three parts: two letters (the prefix), six digits (the number), and one optional letter (the suffix).
The following output formats are available for a NINO.
A NINO can be masked without a separator or with a separator in either a three- or five-part format.
C indicates values that are copied. X indicates values that are masked. For example, 3C4X indicates that the first three characters are copied and the next four characters are masked.
| Fields to be masked | Format without separator |
|---|---|
| Prefix, Number | UK=8X1C |
| Number (MTD=mask default) | UK=2C6X1C |
| Prefix, Number, Suffix (MTD=random only) | UK=9X |
To create a NINO with either a three- or five-part format, use the following parameters:
| Fields to be masked | Format with dash separator | Format with space separator | Format with period separator |
|---|---|---|---|
| Prefix, Number (three-part) | UK=2X-6X-1C | UK=2X 6X 1C | UK=2X.6X.1C |
| Prefix, Number (five-part) | UK=2X-2X-2X-2X-1C | UK=2X 2X 2X 2X 1C | UK=2X.2X.2X.2X.1C |
| Number (three-part) | UK=2C-6X-1C | UK=2C 6X 1C | UK=2C.6X.1C |
| Number (five-part) | UK=2C-2X-2X-2X-1C | UK=2C 2X 2X 2X 1C | UK=2C.2X.2X.2X.1C |
| Prefix, Number, Suffix (three-part) (MTD=random only) | UK=2X-6X-1X | UK=2X 6X 1X | UK=2X.6X.1X |
| Prefix, Number, Suffix (five-part) (MTD=random only) | UK=2X-2X-2X-2X-1X | UK=2X 2X 2X 2X 1X | UK=2X.2X.2X.2X.1X |
The following data types are permitted for source and destination columns. Restrictions for each data type are noted.
The VAL=Y parameter is not valid for NINO masking and will be ignored.
The following checks will be made during processing:
A source row will be skipped and not written to the destination table if the following occurs: