In the code specification, you can define the default value for the interpretation of data streams that contain plain text values. The default value in the Loader is ASCII.
<code_spec> ::= <standard_code_spec> | CODESET <valCODESET_NAME>
<standard_code_spec> |
Possible values: ASCII | UCS2 | UTF8 |
CODESET <valCODESET_NAME> |
Specification of the code attribute valCODESET_NAME |
Code specification when using LONG data
<longfile_code_spec> ::= <code_spec> | BINARY
BINARY |
Data is
exported/imported without conversion |
If no code is specified in the code_spec command, the Loader uses a default value for the code specification of the data stream. This is derived from the internal database data type of the column to be loaded. If the external code attribute and the internal database data type are different, the Loader converts the data. If the types are incompatible, the Loader generates an error message and stops processing the command.
When you export or import data, you can transform it between various code types. If you export/import ASCII data into an ASCII database or UCS2 data into a UNICODE database, the data does not have to be converted.
The following combinations are possible (internal database data types and external data types):
Internal database data Type |
Possible code specifications for data streams with clear text values when exporting data |
(VAR)CHAR ASCII |
ASCII, UCS2, UTF8 |
(VAR)CHAR UNICODE |
UCS2, UTF8 |
(VAR)CHAR BYTE |
BINARY, ASCII (HEX), UCS2 (HEX), UTF8 (HEX) |
Numeric Data Types |
ASCII, UCS2, UTF8 |
Internal Database Data Type |
Possible code specifications for data streams with clear text values when importing data |
(VAR)CHAR ASCII |
ASCII |
(VAR)CHAR UNICODE |
ASCII, UCS2, UTF8 |
(VAR)CHAR BYTE |
BINARY, ASCII, UCS2 (HEX), UTF8 (HEX) |
Numeric Data Types |
ASCII, UCS2, UTF8 |
See also:
When you export /import LONG data, you determine the default values by using the syntax rule longfile_code_spec. This also enables you to transform LONG data between various code types.
If you are exporting/importing ASCII LONG data into an ASCII database or UCS2 LONG data into a UNICODE database, the data does not have to be converted.
The following combinations are possible (internal and external database data types):
Internal Database Data Type |
Possible Code Specifications of the LONG Data Stream for Exporting Data |
LONG ASCII |
ASCII, UCS2, UTF8 |
LONG UNICODE |
UCS2, UTF8 |
LONG BYTE |
BINARY, ASCII (HEX), UCS2 (HEX), UTF8 (HEX) |
Internal Database Data Type |
Possible Code Specifications of the LONG Data Stream for Importing Data |
LONG ASCII |
ASCII |
LONG UNICODE |
ASCII, UCS2, UTF8 |
LONG BYTE |
BINARY, ASCII, UCS2 (HEX), UTF8 (HEX) |
See also:
Exporting and Importing LONG Values