Credit card privacy provider
Use the credit card privacy provider to generate a valid and unique credit card number (CCN). By default, the provider uses a repeatable method that algorithmically generates a consistently altered CCN based on the source CCN. The provider can also generate a random value when the source data does not have a CCN value or when there is no need for transforming the source CCN in a consistent manner.
A CCN, as defined by ISO 7812, consists of a six-digit issuer identifier followed by a variable length account number and a single check digit as the final number. The check digit verifies the accuracy of the CCN and is generated by passing the issuer identifier and account numbers through the Luhn algorithm. The credit card privacy provider supports a CCN up to a maximum length of 16 digits.
The repeatable method is based on the source CCN and offers several masking options for CCN values. The default option includes the first four digits of the issuer identifier from the source CCN and alters the remaining two digits based on the source value. Another option includes the first four digits of the issuer identifier from the source CCN and randomly generates the remaining two digits. The other option copies all six digits of the issuer identifier. The repeatable method also assigns a valid check digit.
The random method generates a CCN that is not based on the source value and assigns a valid check digit.
Examples
- Repeatable default
The following example uses the repeatable method and preserves invalid values from the source field. As no pattern parameter was specified for the repeatable method, the provider will copy the first four digits of the source issuer identifier values and mask the fifth and sixth digits.
trans pro=ccn, mtd=rep, wheninv=pre, flddef1=(name=ccnchar, dt=char)
This example uses the following parameters:
- MTD=REP
- This parameter masks the CCN in a repeatable manner.
- WHENINV=PRE
- The parameter copies invalid source values to the destination field.
- Repeatable with six-digit pattern
The following example uses the repeatable method, copies the six-digit issuer identifier, and preserves invalid values from the source field.
trans pro=ccn, mtd=rep, pat=6c, wheninv=pre, flddef1=(name=ccnchar, dt=char)
This example uses the following parameters:
- MTD=REP
- This parameter masks the CCN in a repeatable manner.
- PAT=6C
- This parameter copies all six digits of the issuer identifier.
- WHENINV=PRE
- The parameter copies invalid source values to the destination field.
Syntax
The credit card privacy provider uses the following syntax:
- Masking parameters
TRANS PRO = CCN , [ METHOD = { REPEATABLE | RANDOM } ] ,
- MTD=REP parameters
[ PATTERN = { 4C2R | 6C } ] ,
- Processing parameters
[ WHENINVALID = PRESERVE ] , [ DISCARDLIMIT = discard-limit-value ] ,
- Data definition parameters
FLDDEFn = ( NAME = field-name, DATATYPE = datatype-value, [ PRECISION = field-precision-value ], [ SCALE = field-scale-value ], [ LENGTH = field-length-value ], [ CODEPAGE = codepage-value ], [ CPTYPE = { DB2ZOS |DB2LUW | ORACLE |SYBASE |ODBC | INFORMIX |NETEZZA |SQLSERVER |TERADATA |ANY |NONE } ] ) , [ CODEPAGE = codepage-value ] , [ CPTYPE = { DB2ZOS | DB2LUW | ORACLE | SYBASE | ODBC | INFORMIX | NETEZZA | SQLSERVER | TERADATA | ANY | NONE } ]
Masking parameters
Parameters that determine how to mask data.
- PROVIDER (or PRO)
- Required. Enter the provider name, CCN.Note: The PRO parameter must be first in the masking string. All other parameters can appear in any order.
- METHOD (or MTD)
- The masking method type. Enter one of the following options:
- REPEATABLE (or REP)
- Default. Generates a CCN in a repeatable manner and copies all or part of the issuer identifier from the source CCN. Use PAT to specify which digits to copy from the issuer identifier. The masked values are based on the source values.
- RANDOM (or RAN)
- Generates a CCN by using a random masking algorithm. The masked values are not based on the source values.
MTD=REP parameters
Parameters for use with MTD=REP only.
- PATTERN (or PAT)
- Options for overriding the MTD-REP masking default, which includes the first four digits of the issuer identifier from the source CCN and alters the remaining two digits based on the source value.
PAT is not compatible with the parameter MTD=RAN.
Enter one of the following options:
- 4C2R
- The provider copies the first four digits of the issuer identifier and randomly generates the fifth and sixth digits.
- 6C
- The provider copies all six digits of the issuer identifier.
Processing parameters
Parameters for managing provider processes.
- WHENINVALID (or WHENINV)
- Determines how to process invalid source values. If this parameter is omitted, the provider does not copy invalid source values to the destination field and skips rows that contain these values.
WHENINV is not compatible with the parameter MTD=RAN.
Enter the following option:
- PRESERVE (or PRE)
- Copy invalid source values to the destination field.
Data definition parameters
Parameters for defining source and target data. For further information see, supported data types .
- FLDDEFn
- Required. Specifies the attributes of input values to use for processing. See Field definition parameter.
- DISCARDLIMIT (or DLIM)
- Specifies the number of failed rows to discard before the provider stops processing.
- CODEPAGE (or CP)
- An integer value that specifies the codepage or character-set identifier of the source fields. The default is UTF-8. The CP parameter within the FLDDEFn parameter overrides this value.
- CPTYPE (or CPT)
- The codepage type of the source fields. The CPT parameter within the FLDDEFn
parameter overrides this value.
When the origin of the data is DBMS-specific but not tied to any one DBMS, specify the value as ANY. When the origin of the data is from a non-DBMS source, specify the value as NONE. As there are no DBMS-specific code pages for Netezza®, a specification of NONE is implied when Netezza is specified.
Enter one of the following values:
Value Description DBZ (or DB2zOS) DB2® for z/OS® DB2 (or DB2LUW) DB2 for Linux®, UNIX, and Windows IFX (or INFORMIX) Informix® MSS (or SQLSERVER) Microsoft SQL Server NZ or NETEZZA Netezza ODBC ODBC ORA (or ORACLE) Oracle SYB (or SYBASE) Sybase TD or TERADATA Teradata ANY Any DBMS NONE No DBMS
Supported data types
The credit card privacy provider supports the following data types for source and destination fields:
DB2 data type | ODPP equivalent | Description |
---|---|---|
CHAR | CHAR | Fixed size character data that is left justified and space padded. |
VARCHAR | VARCHAR | Character data starting with a short integer value that indicates the length, in bytes, of the character data to follow. |
DECIMAL | DECIMAL_370 | Packed decimal encoded buffer. |
BIGINT | U_LONG_LONG | An 8 byte unsigned numeric value in the range 0 to 18,446,744,073,709,551,615. |