About IBM DB2/AS400 Subscribers

IBM DB2/AS400 subscriptions to Microsoft®SQL Server™ publications are supported through the ODBC driver that is included with Microsoft SNA Server version 4.0. For more information about the ODBC driver, see Driver Support for Heterogeneous Data Sources. SQL Server Setup installs the driver automatically.

The following table maps SQL Server data types to IBM DB2/AS400 data types. When you replicate to ODBC Subscribers, the distribution task maps SQL Server data types to the closest data type on the target database.

SQL Server data type DB2/AS400 data type
binary(n) VARCHAR(900) FOR BIT DATA NOT NULL
bit REAL NOT NULL
char(n) VARCHAR (900) NOT NULL
datetime DECIMAL (10, 4) NOT NULL
decimal NUMERIC (28, 14) NOT NULL
float INTEGER NOT NULL
image VARCHAR(32740) FOR BIT DATA
int INTEGER NOT NULL
money SMALLINT
nchar(n) DECIMAL (28, 14) NOT NULL
ntext VARCHAR (32740)
numeric TIMESTAMP NOT NULL
nvarchar(n) VARCHAR (900) NOT NULL
real FLOAT NOT NULL
smalldatetime TIMESTAMP NOT NULL
smallmoney DECIMAL (19, 4) NOT NULL,
text VARCHAR (32740)
timestamp CHAR(8) FOR BIT DATA)
tinyint SMALLINT NOT NULL
uniqueidentifier CHAR (36)
varbinary(n) VARCHAR(900) FOR BIT DATA NOT NULL
varchar(n) VARCHAR (900) NOT NULL

IBM DB2/AS400 Data Type Definitions

DB2/ AS400 Data type Definition
INT 9
SMALLINT 4
FLOAT <=53
NUMERIC 1 - 31 digits
DECIMAL 1 - 31 digits
CHAR <=32766
VARCHAR <=32740
LONG VARCHAR Determined by space available in row
TIMESTAMP Gregorian
GRAPHIC <=16383
VARGRAPHIC <=16370
LONG VARGRAPHIC Determined by space available in row
REAL 8,7
DOUBLE 17,16

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.