nls

Enable the use of the Graphic data type for double-byte-only storage

USYS$DB2_PARAMS = nls : enabled | disabled

USYS$DB2_PARAMS = nls : on | off

Description

When this option is enabled, fields defined with data type String and packing code Raw are mapped to the Graphic, Vargraphic, Long Vargraphic, or DBCLOB SQL data types, depending on the length of the field.

If this option is disabled, the fields are treated normally, that is, as Raw, and are mapped to Char For Bit Data, Varchar For Bit Data, Long Varchar For Bit Data, or BLOB.

If not specified, the default is disabled (or off).

Unicode Restrictions on Windows and Unix

When $DEF_CHARSET is UTF8 or the W packing code is used, the CCSID UNICODE clause is added to the table definition. However, DB2 does not allow the Graphic data type in combination with CCSID UNICODE. For this reason, when nls=on, the following restrictions apply:

  • The database must use an MBCS character set.

  • $DEF_CHARSET must specify an MBCS character set; it cannot be UTF8.

  • A field with a W packing code is not allowed in the same table as a string field with the Raw packing code.

Related Topics