Considerations when loading Unicode data
Data translation
LOADPLUS either loads Unicode data directly or invokes DSNUTILB to load Unicode data, depending on the type of load that you are running and any translation that you are performing. For more information, see Data-translation.
For translations in which LOADPLUS invokes DSNUTILB, see INTO-TABLE-statement-for-a-DSNUTILB-load for compatibility of the INTO statement that you specify and any data type conversion that you request.
Recommended option specifications
We recommend specifying the following options when loading Unicode data:
ASCII, EBCDIC, or UNICODE
Specify the appropriate keyword for your input data.
CCSID
Ensure that you use the encoding scheme for which the input data was created and that the encoding scheme matches the ASCII, EBCDIC, or UNICODE keyword that you specify. For more information, see CCSID.
NOSUBS
Specifying this option ensures that LOADPLUS does not change your data when it encounters characters that require substitution. For more information, see NOSUBS.
TRIM
We strongly recommend that you specify this option for CHAR and VARCHAR fields if you do not need to preserve trailing blanks. If translation causes an expansion of the data, specifying this option prevents LOADPLUS from discarding records that you do not want to discard. For more information, see CHAR or VARCHAR.
Constants
When loading Unicode data, LOADPLUS handles constants in your LOAD command based on your command and installation options. If you specify a hexadecimal string for the constant, the string must be in the internal format of either the input or the output, depending on the option. The following sections describe these requirements.
LOADPLUS does not translate hexadecimal strings. LOADPLUS does not support the hexadecimal graphic string constants UX'xxxx' and GX'xxxx'.
The following table describes constant considerations by option when loading Unicode data:
Option | Considerations |
---|---|
WHEN, NULLIF, and DEFAULTIF | You can refer to Unicode columns in the predicate of a WHEN, NULLIF, or DEFAULTIF option. LOADPLUS assumes that the constant that you specify is in EBCDIC format and translates it according to the value of the RULES option:
|
VALUE | When you are loading Unicode data, LOADPLUS assumes that the VALUE constant that you specify is in EBCDIC format, and translates it to the CCSID of the table space. If you specify a hexadecimal string for the constant, the string must be in the internal format of the table space. |
FORMAT CSV | When your input data is Unicode, LOADPLUS assumes that the values for the TERMINATEDBY, ENCLOSEDBY, and AND options are in EBCDIC format and translates them, if necessary, to the CCSID of the input data. Note the following restrictions for these options:
|
CONTINUEIF | When loading Unicode data, LOADPLUS assumes that the CONTINUEIF constant that you specify is in EBCDIC format, and translates it, if necessary, to the CCSID of the input data. If you specify a hexadecimal value, it must be in the internal format of the input. |
TRUNCATE option
When loading Unicode data, LOADPLUS performs truncation after translation.