Field definition parameter
The field definition (FLDDEFn) parameter describes fields to use for processing and is required for each provider function.
The field definition (FLDDEFn) parameter uses the following syntax:
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 } ] ) ,
- FLDDEFn
- Required. Describes a field to use for processing, where
n is a numeric value to distinguish multiple fields.
Each field that is referenced in the masking function must have a
corresponding FLDDEFn parameter. For
example, the parameters FLDDEF1 and
FLDDEF2 describe separate fields.
- NAME
- Required. The field name.
- DATATYPE (or DT)
- Required. The data type of the field. Note: For the DECIMAL (n,m) or NUMBER (n,m) data type, specify a DATATYPE value according to the scale ('m'):
- If scale 'm' is 0, use the following guidelines to
determine the DATATYPE value:
- If precision 'n' is less than or equal to 9, specify DT=SMALLINT or DT=INTEGER, DT=U_SMALLINT, or DT=U_INTEGER based on the range of the values.
- If precision 'n' is greater than 9 and less than or equal to 18, specify DT=LONG_LONG, DT=U_LONG_LONG, DT=INTEGER or DT=SMALLINT DT=U_INTEGER, DT=U_SMALLINT, based on the range of the values.
- If precision 'n' is greater than 18, specify DT=VARCHAR_SZ or DT=CHAR, and for the Affinity privacy provider, also specify RULE=NUMERIC.
- If scale 'm' is greater than 0, specify DT=VARCHAR_SZ or DT=CHAR, and for the Affinity privacy provider, also specify RULE=NUMERIC.
Enter one of the following values:
- CHAR (for DB2 use DATETIME_CHAR for AGE provider)
- Fixed size character data that is left-justified and space padded.
- DATE (for DB2 use ODBC_DATE)
- The date is contained within three consecutive
shorts. The first is a signed short that contains
the year, the second is an unsigned short that
contains the month, and the third is an unsigned
short that contains the day. In a C-type structure
format the date appears as:
typedef struct s_odbc_date { signed short Year; unsigned short Month; unsigned short Day; } ODPP_ODBC_DATE;
- DATETIME_CHAR (for DB2 use for TIMESTAMP; use for CHAR with AGE provider)
- Fixed size character data that contains a date-time value that is left-justified and space padded.
- DATETIME_SZ
- Character data string that contains a date-time value that is left-justified, space padded, and terminated by a NULL character.
- DATETIME_VARCHAR (for DB2 use for VARCHAR with AGE provider)
- Variable size character data that starts with a short integer value that indicates the length, in bytes, of the character date-time value that follows.
- DATETIME_WCHAR
- Fixed size wide-character data that contains a date-time value that is left-justified and space padded.
- DATETIME_WSZ
- Wide character data string that contains a date-time value that is left-justified, space padded and terminated by a NULL character.
- DATETIME_WVARCHAR
- Variable-size wide character data that starts with a short integer value that indicates the length, in bytes, of the wide character date-time value that follows.
- DECIMAL_370 (for DB2 use for DECIMAL)
- An IBM® mainframe 370/MVS/ESA/zOS packed decimal encoded buffer. A packed decimal field has two decimal numbers that are expressed in a single byte of storage in all but the rightmost/last portion of a packed decimal field. The last rightmost/last byte has the sign indicator in the rightmost/last part of the byte. The standard signs used a 0xF for positive numbers and 0xD for negative numbers.
- DOUBLE (for DB2 use for FLOAT if number is in the range 1.7E +/- 308 (15 digits))
- A double-precision floating point number. Range of values: 1.7E +/-308 (15 digits).
- FLOAT (for DB2 use for FLOAT if number is in the range 3.4E +/- 38 (7 digits))
- A floating point number. Range of values: 3.4E +/- 38 (7 digits).
- INTEGER (for DB2 use for INT)
- A 4-byte signed integer. Range of values: -2,147,483,648 to 2,147,483,647.
- LONG_LONG (for DB2 use for BIGINT)
- An 8-byte signed numeric value. Range of values: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
- ORA_VARNUM
- An Oracle VARNUM-type. Similar to the Oracle external datatype NUMBER except that the first byte contains the length of the number representation. The length value does not include the length byte itself. The user must reserve 22 bytes to use the longest possible VARNUM, where the first byte is the length and bytes 2 through 22 contain the 21-binary format of the Oracle NUMBER-type. For complete details on VARNUM and NUMBER data types, see the Oracle documentation.
- SMALLINT
- A 2-byte signed integer value. Range of values: -32,768 to 32,767.
- TIME (for DB2 use ODBC_TIME)
- The time is contained in three consecutive unsigned
shorts. The first short contains the hour, the
second short contains the minute, and the third
short contains the second. In a C-type structure
format the time appears
as:
typedef struct s_odbc_time { unsigned short Hour; unsigned short Minute; unsigned short Second; } ODPP_ODBC_TIME;
- TIMESTAMP (for DB2 use DATETIME_CHAR)
- The timestamp is contained in a consecutive
arrangement of six shorts followed by an unsigned
integer. The first is a signed short that contains
the year, the second is an unsigned short that
contains the month, the third is an unsigned short
that contains the day, the fourth is an unsigned
short that contains the hour, the fifth is an
unsigned short that contains the minute the sixth is
an unsigned short that contains the second, and at
the end of this consecutive arrangement is an
unsigned integer that contains the fractional
second. In a C-type structure format the timestamp
appears
as:
typedef struct s_odbc_timestamp { signed short Year; unsigned short Month; unsigned short Day; unsigned short Hour; unsigned short Minute; unsigned short Second; unsigned int Fraction; } ODPP_ODBC_TIMESTAMP;
- U_INTEGER
- A 4-byte unsigned integer value. Range of values: 0 - 4,294,967,295.
- U_LONG_LONG (for DB2 use for BIGINT)
- An 8-byte unsigned numeric value. Range of values: 0 - 18,446,744,073,709,551,615.
- U_SMALLINT
- A 2-byte unsigned integer value. Range of values: 0 - 65,535.
- U_TINYINT
- A single byte unsigned integer value. Range of values: 0 - 255.
- VARCHAR (for DB2 use DATETIME_VARCHAR with AGE provider)
- Character data that starts with a short integer value that indicates the length, in bytes, of the character data to follow.
- VARCHAR_SZ
- Character data string that is terminated by a NULL character.
- WCHAR
- Fixed-size wide character data that is left-justified and space padded.
- WVARCHAR
- Wide character data that starts with a short integer value that indicates the length, in bytes, of the wide character data to follow.
- WVARCHAR_SZ
- Wide character data string that is terminated by a NULL character.
- If scale 'm' is 0, use the following guidelines to
determine the DATATYPE value:
- LENGTH (or LEN)
- An integer value that specifies the length of the field. This parameter is used only with character data types.
- PRECISION (or PRE)
- An integer value that specifies the precision of a numeric field.
- SCALE (or SCA)
- A short integer value that specifies the scale of a numeric field.
- CODEPAGE (or CP)
- An integer value that specifies the codepage or character-set
identifier of the field. This parameter can override the CP
value that is specified as part of the provider syntax when
fields in the same syntax expression use different
codepages.
This parameter is required when the following data types are used: CHAR, DATETIME_CHAR, VARCHAR, DATETIME_VARCHAR, VARCHAR_SZ or DATETIME_SZ,, and one of the following situations occur:
- The codepage information is not available within the data privacy application environment.
- The CP parameter was not specified as part of the provider syntax.
- The codepage for a field that is described by the FLDDEFn parameter is different than the codepage specified as part of the provider syntax.
- CPTYPE (or CPT)
- The codepage type. This parameter can override the CPT value
that is specified as part of the provider syntax when fields in
the same syntax expression use different codepage types.
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.
This parameter is required when the following data types are used: CHAR, VARCHAR, DATETIME_CHAR, DATETIME_VARCHAR,VARCHAR_SZ or DATETIME_SZ and one of the following situations occur:
- The CP parameter was specified as part of the FLDDEFn syntax.
- The CPT parameter was not specified as part of the provider syntax.
- The codepage type for a field that is described by the FLDDEFn parameter is different from the codepage type specified as part of the provider syntax.
Enter one of the following values:
- DB2ZOS (or DBZ)
- DB2 z/OS
- DB2LUWDB2 (or DB2)
- DB2-LUW
- ORACLE (or ORA)
- Oracle
- SYBASE (or SYB)
- Sybase
- ODBC
- ODBC
- INFORMIX (or IFX)
- Informix®
- SQLSERVER (or MSS)
- MS SQL Server
- TERADATA (or TD)
- Teradata
- NETEZZA (or NZ)
- Netezza
- ANY
- Any DBMS
- NONE
- No DBMS