The conversion tables shown in this section list the Natural data formats and their corresponding data types in an Adabas database or in a relational database management system (RDBMS).
The generation of DDMs from an RDBMS requires the conversion from RDBMS-specific data types to Natural data formats. For general information on data access and data conversion, see the list of related documentation in Related Topics.
For information on using large and dynamic variables and/or fields, refer to the section DDM Generation and Editing for Varying Length Columns in the Statements documentation.
This section covers the following topics:
| Data Type | Adabas Data Format | Natural Data Format/Length | 
|---|---|---|
| alphanumeric | A (n) | An | 
| binary | B (n) | Bn | 
| fixed |  
                                        F (n)  |  
                                        In | 
| float | G (n) | Fn | 
| packed | P (n) | P (2 * n - 1) | 
| unpacked | U (n) | Nn | 
| wide character (Unicode) | W (n) | U (n/2 rounded down) | 
| RDBMS Data Type | Natural Data Format/Length | 
|---|---|
| boolean | L | 
| char (n) | An | 
| date | A10 | 
| fixed (p,q) | Np-q,q | 
| float | F8 | 
| integer | I4 | 
| long | A (DYNAMIC) | 
| long varchar | A (DYNAMIC) | 
| smallint | I2 | 
| string | An | 
| time | A8 | 
| timestamp | A26 | 
| varchar | An | 
| RDBMS Data Type | Natural Data Format/Length | 
|---|---|
| char(5) | A5 | 
| char(253) | A253 | 
| decimal(5) | N5 | 
| decimal(10.4) | N6.4 | 
| double precision | N10.6 | 
| float(1...21) | N2.6 | 
| float(22...53) | N10.6 | 
| integer | I4 | 
| numeric(5) | N5 | 
| numeric(10.4) | N6.4 | 
| real | F4 | 
| smallint | I2 | 
| RDBMS Data Type | Natural Data Format/Length | 
|---|---|
| date | A10 | 
| blob | B (DYNAMIC) | 
| clob | A (DYNAMIC) | 
| dbclob | U (DYNAMIC) | 
| decimal(5) | N5 | 
| decimal(10.4) | N6.4 | 
| fixed character(5) | A5 | 
| float | Fn | 
| graphic(n) | Un | 
| longvar | A (DYNAMIC) | 
| longvarg | A (DYNAMIC) | 
| large integer | I4 | 
| scientific notation | N10.6 | 
| small integer | I2 | 
| special data | A253 | 
| system date and time | A10 | 
| time | A8 | 
| timestamp | A26 | 
| varchar | An | 
| varg | 2*An | 
| vargraphic(n) | Un | 
Notes:
blob,
                           clob, dbclob, graphic and
                           vargraphic with DB2 is Entire Access Version 6.2.1 and above. 
                  graphic and
                           vargraphic are only available when the database has been generated
                           with a statement like CREATE DATABASE mydb USING CODESET UTF-8 TERRITORY
                              US. Refer to your local DB2 documentation for further
                           information.
                  | RDBMS Data Type | Natural Data Format/Length | 
|---|---|
| byte | An | 
| char(n) | An | 
| date | A10 | 
| datetime | A26 | 
| decimal(p,q) | Np-q,q | 
| float | F8 | 
| integer | I4 | 
| interval | A17 | 
| money | N14.2 | 
| nchar(2*n) | Un | 
| nvarchar(2*n) | Un | 
| real | F4 | 
| serial | I4 | 
| smallfloat | F4 | 
| smallint | I2 | 
| text | An | 
| varchar(n) | An | 
Note:
Prerequisite for the use of the data types nchar and
                          nvarchar with Informix is Entire Access Version 6.2.1 and above. 
                  
| RDBMS Data Type | Natural Data Format/Length | 
|---|---|
| blob | B (DYNAMIC) | 
| char (n) | An | 
| clob | A (DYNAMIC) | 
| date | A10 | 
| decimal (p,q) | Np-q,q | 
| double precision | F8 | 
| float | F4 | 
| integer | I4 | 
| long | A (DYNAMIC) | 
| long raw | B (DYNAMIC) | 
| nchar(n) | Un | 
| nclob | U (DYNAMIC) | 
| number | Nn | 
| nvarchar2(n) | Un | 
| raw (n) | Bn | 
| real | F4 | 
| rowid | An | 
| smallint | I2 | 
| timestamp | A26 | 
| varchar | An | 
| varchar2 (n) | An | 
Notes:
long and long
                              raw, and clob and blob in the same
                           table.
                  timestamp is
                           Entire Access Version 6.2.1 and above. The
                           timestamp variants timestamp with time zone and timestamp
                              with local time zone are not supported.
                  nchar,
                           nvarchar2 and nclob with Oracle is Entire Access
                           Version 6.2.1 and above.
                  | RDBMS Data Type | Natural Data Format/Length | 
|---|---|
| binary (n) | Bn | 
| bit | N1 | 
| char (n) | An | 
| datetime | A26 | 
| float | F8 | 
| int | I4 | 
| money | N15.4 | 
| real | F4 | 
| smalldatetime | A26 | 
| smallint | I2 | 
| smallmoney | N6.4 | 
| timestamp | B8 | 
| tinyint | I2 | 
| unichar(n) | Un | 
| univarchar(n) | Un | 
| varbinary (n) | Bn | 
| varchar (n) | An | 
Note:
Prerequisite for the use of the data types unichar and
                          univarchar with Sybase is Entire Access Version 6.2.1 and above. These data types can only be
                          used with the Entire Access ctlib interface for Sybase.
                  
| RDBMS Data Type | Natural Data Format/Length | 
|---|---|
| binary (n) | Bn | 
| bit | N1 | 
| char (n) | An | 
| datetime | A26 | 
| float | F8 | 
| image | B (DYNAMIC) | 
| int | I4 | 
| money | N15.4 | 
| nchar(2*n) | Un | 
| ntext | U (DYNAMIC) | 
| nvarchar(2*n) | Un | 
| real | F4 | 
| smalldatetime | A26 | 
| smallint | I2 | 
| smallmoney | N6.4 | 
| text | A (DYNAMIC) | 
| timestamp | B8 | 
| tinyint | I2 | 
| varbinary (n) | Bn | 
| varchar (n) | An | 
Note:
Prerequisite for the use of the data types nchar,
                          nvarchar and ntext with Microsoft SQL Server is
                          Entire Access Version 6.2.1 and above.
                          Furthermore, these data types require the use of the MSSQLODBC driver of Entire
                          Access Version 6.2.1 and above.
                  
The following documentation sections relate to converting data from Adabas or RDBMSs:
 Programming Guide:
 Accessing Data in an
                                  Adabas Database