PreviousNext
Help > Data types conversion and formats > Data types equivalences
Data types equivalences

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 a 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

2 bytes signed integer

 

 

Integer, <=9 digits

4 bytes signed integer

 

 

Integer, <=19 digits

8 bytes signed integer

 

 

<= 15 digits

8 bytes Real 

 

 

<= 17 integer digits, and less than 6 decimal digits.

Currency

 

 

<= 38 digits or SQL with SQLFULLPRECISION property set.

Numeric (version 12 and up only)

 

 

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.