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> ::= ASCII | UCS2 | UTF8
<longfile_code_spec> ::= <code_spec> | BINARY
valCODESET_NAME |
Code attribute |
If no code attribute is specified in the command, the Loader uses a default value for the code attribute 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 load or unload data, you can transform it between various code types. If you load/unload 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 attributes for data streams with plain text values when unloading |
(VAR)CHAR ASCII |
ASCII, UCS2, UTF8 |
(VAR)CHAR UNICODE |
UCS2, UTF8 |
(VAR)CHAR BYTE |
BINARY, ASCII (HEX), UCS2 (HEX), UTF8 (HEX) |
Numerical data types |
ASCII, UCS2, UTF8 |
Internal Database Data Type |
Possible code attributes for data streams with plain text values when loading |
(VAR)CHAR ASCII |
ASCII |
(VAR)CHAR UNICODE |
ASCII, UCS2, UTF8 |
(VAR)CHAR BYTE |
BINARY, ASCII, UCS2 (HEX), UTF8 (HEX) |
Numerical data types |
ASCII, UCS2, UTF8 |
See also:
When you load/unload 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 loading/unloading 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 database data types and external data types):
Internal Database Data Type |
Possible code attributes of the LONG data stream during unloading |
LONG ASCII |
ASCII, UCS2, UTF8 |
LONG UNICODE |
UCS2, UTF8 |
LONG BYTE |
BINARY, ASCII (HEX), UCS2 (HEX), UTF8 (HEX) |
Internal Database Data Type |
Possible code attributes of LONG data stream during loading |
LONG ASCII |
ASCII |
LONG UNICODE |
ASCII, UCS2, UTF8 |
LONG BYTE |
BINARY, ASCII, UCS2 (HEX), UTF8 (HEX) |
See also:
Unloading and Loading LONG Values