Skip to content

Converting Data to DB2

Before data can be converted to DB2, the DataFlex DB2 Driver must be loaded. This is best accomplished by creating a Managed Connection for the workspace. You can also load drivers using the Configure Database Drivers option from the Tools menu in the Studio.

Restrictions

DB2 has a number of rules and specifications that differ from DataFlex. In general, they are less restrictive, but there are exceptions. The DataFlex Specifications can be found in the DataFlex documentation, while the DB2 specifications can be found in the DB2 documentation.

One restriction to be aware of is the maximum row size (record length). The maximum row size in DB2 depends on the page size defined for the database. The page size can be 4K, 8K, 16K, or 32K. The maximum row sizes are as follows:

  • 4005 bytes for 4K page size
  • 8101 bytes for 8K page size
  • 16293 bytes for 16K page size
  • 32677 bytes for 32K page size

The actual data for BLOB, CLOB, LONG VARCHAR, DBCLOB, and VARGRAPHIC type columns is not included in this maximum. Information about the location of that data takes up some space in the row.

If a DataFlex table to be converted results in a table that does not comply with this rule, the DataFlex table cannot be converted. You must ensure that the database uses a page size that allows the records to be converted, or you should adjust the definition of the DataFlex table before conversion. This means you also need to adjust all DataFlex programs using this table.

See Also