PreviousNext
Help > Development > Extended info > AS/400 Native Data Types
AS/400 Native Data Types

 When a date or time is stored in DB2/400 database in character or numeric format (Not in original Date or Time data type), Easycom needs to know how to convert a date or time constant value given in SQL queries, into the right data type for the AS/400.

Properties NATIVETYPE, DATETYPE and TIMETYPE in extended info can have the following values, depending on the field data type on AS/400:

 

Value

AS/400 data type

0

Character 

1

Integer 16 bits (2 bytes) 

2

Integer 32 bits (4 bytes) 

3

Float simple precision (4 bytes) 

4

Float Double precision (8 bytes) 

6

Packed decimal 

7

Zoned 

8

Date 

9

Time 

10

Time Stamp 

13

Integer 64 bits (8 bytes) 

 

When file description is imported, Field level property NATIVETYPE is set to the native data type on AS/400.

In the following example, the field is packed decimal on AS/400:

<EASYCOM>
NATIVETYPE=6
</EASYCOM>

In this example, the field contains a date value (YYYYMMDD) stored as a packed decimal. You need to change the WinDev data type to "Date" in the Analysis. Easycom will convert WinDev dates To/From Packed decimal.

 

When NATIVETYPE is not set, properties DATETYPE and TIMETYPE in the file or connection extended info, tells the system how date and time values are stored in the database.