public abstract class DB2
extends java.lang.Object
Library of functions/procedures for DB2 UDB that supports the shipping IDM JDBC driver preconfigurations.
This class MUST be installed on the database server for the shipping preconfigurations to work. It MUST also be compiled for the 1.1.8 JVM when deployed on a DB2 UDB 7 server.
NOTE: DB2 UDB Version 7 doesn't allow functions to execute any SQL statements, even if the SQL is read-only.
Modifier and Type | Field and Description |
---|---|
static int |
LEN_TIMESTAMP
The length of a default DB2 timestamp (e.g. "
2002-01-01-00.00.00.000000 ") |
Modifier and Type | Method and Description |
---|---|
static void |
PROC_CLEANUPLOG(java.lang.String I_SCHEMA)
Stored Procedure used by preconfigured driver(s) to move
processed rows from the log table to the processed table.
|
static void |
PROC_IDG(long[] O_IDG)
Stored procedure used by preconfigured driver(s)
to retrieve the last generated primary key for table
INDIRECT.LAST_IDG.
|
static void |
PROC_IDU(long[] O_IDU)
Stored procedure used by preconfigured driver(s)
to retrieve the last generated primary key for table
INDIRECT.LAST_IDU.
|
static java.lang.String |
TO_ODBC_TIMESTAMP(java.lang.String timestamp)
Converts a default DB2 timestamp (e.g. "
2002-01-01-00.00.00.000000 ")
to ODBC cannonical format. |
static java.lang.String |
TOBASE64(byte[] bytes)
Base64-encodes
bytes . |
public static final int LEN_TIMESTAMP
2002-01-01-00.00.00.000000
")public static java.lang.String TOBASE64(byte[] bytes) throws java.sql.SQLException
bytes
.bytes
- may be null
; may be emptynull
java.sql.SQLException
public static java.lang.String TO_ODBC_TIMESTAMP(java.lang.String timestamp)
2002-01-01-00.00.00.000000
")
to ODBC cannonical format.timestamp
- may be null
null
public static void PROC_IDG(long[] O_IDG) throws java.sql.SQLException
O_IDG
- may be null
; may contain null
java.sql.SQLException
public static void PROC_IDU(long[] O_IDU) throws java.sql.SQLException
O_IDU
- may be null
; may contain null
java.sql.SQLException
public static void PROC_CLEANUPLOG(java.lang.String I_SCHEMA) throws java.sql.SQLException
I_SCHEMA
- the schema name of the log/processed tables;
may be null
java.sql.SQLException