PreviousNext
Help > Development > Accessing AS/400 data > Native Access > Data types translations
Data types translations

An AS/400 data type is by default translated into a HF when importing a file description, or when executing an SQL query or using HDeclareExternal.

 

Default data type mapping can be manually changed by changing an item data type after DDS import, or by setting the field extended info before to export description to AS/400.

 

 

DDS type

SQL type

Condition

HF type

A (character)

CHAR

 

Text

A OPTION(VARYING)

(variable length)

VARCHAR

 

Text

G + CCSID 13488

(Unicode)

GRAPHIC CCSID(13488)

 

Text Unicode (version 12 and up only)

G + CCSID 13488 + OPTION(VARYING)

(Unicode variable length)

VARGRAPHIC CCSID(13488)

 

Text Unicode (version 12 and up only)

P (Packed decimal) or Z (Zoned)

DECIMAL or NUMERIC

Integer, <= 4 digits and no decimal

2 bytes signed integer

 

 

Integer, <=9 digits and no decimal

4 bytes signed integer

 

 

Integer, <=19 digits and no decimal

8 bytes signed integer

 

 

<= 38 digits and decimal <=6

Numeric

 

 

Others

Text

L

DATE

 

Date

T

TIME

 

Time (HHMMSS)

Z

TIMESTAMP

 

Date and Time

B4 (Short Integer)

SMALLINT

 

2 bytes signed integer

B9 (Long Integer)

INT

 

4 bytes signed integer

B19 (Integer 64 bits)

BIGINT

 

8 bytes signed integer

F

FLOAT

 

Real 8 bytes

F double precision

DOUBLE

 

Real 8 bytes

H

BINARY

 

Binary string

H

VARBINARY

 

Binary string

N/A

CLOB

 

Memo text

N/A

BLOB

 

Other Binary Memo 

N/A

DBCLOB + CCSID 13488

 

Memo Unicode

 

Note :

Easycom maintains initial HyperFile data types when a file is exported to AS/400 and imported again. Original data type is stored in the field description.

When a file is imported, Field Extended info can contain NATIVETYPE property, to memorize the original AS/400 data type.