|
DB2 to UDB |
|
|
The best way to transfer data between mainframe DB2 and UDB on Unix or Linux is to use the UDB native features for data movement. Sometimes these features may not be used (i.e. the mainframe and the Unix system are bot physically connected) and therefore the XFRAME utilities for data migration may be a good solution for the data transfer. Encoding data conversion is defined as the changing of character-set in data from EBCDIC to ASCII. The easiest way to perform this task for DB2 EBCDIC data is download its in flat file and converts its as common EBCDIC flat file through programs conversion. At the end of conversion reload ASCII data on Oracle database. In order to replicate DB2 objects schema is mandatory obtain from customer the up-to-date DDLs. xddlconv analyzing ddls produce 3 different source.
Analyze DDLs DDLs have to be processed by xddlconv utility. See more detailed information in XCONV book. Create UDB workspace In order to replicate DB2 DB you have to create user and tablespace. Tablespaces size depends on amount of data. After tablespace and user definition, tables have to be created. In order to upload data quickly and without hierarchy priority problem we suggest to create index at the end of uploading step. In fact xddlconv utility separates index and table source. Submit all *.sql file produced by xddlconv utility to DB2 using the user just created. Now all table are replicated empty under UDB DB. Aftert data conversion you can proceed with upload step. Data conversion Data files coming from mainframe DB2, downloaded according to the precedure described in the previous chapter, are flat file and therefore they must be converted as any other sequential file. For this reason xddlconv generates the COBOL copybooks that represent the record structure of the files coming from the mainframe. These copybooks must then be processed by cpy2xml and then by xmlconverter to generate all the necessary conversion programs, to be compiled and run to get the converted file. Please refer to the file migration guide to get more information about flat file translation. Just remember that copybooks generated by xddlconv have no redefined structures or overlapping data: therefore data conversion for these will be 100% automatic, without any manual intervention. As example, let's suppose TABLE1.cpy being generated by xddlconv for table TABLE1. You have to build the XML descriptor for the table and to produce the COBOL conversion program. cpy2xml -o TABLE1.xml TABLE.cpy Now you have to compile TABLE1.cbl with your COBOL compiler and run it, according to the instructions provided in the File Migration guide. Data upload ASCII files must be loaded in the databases with the UDB db2 command .For more detailed information about load see UDB Guide. Examples Source DDL CREATE TABLE SCHEMA.TABLE DDL DROP TABLE SCHEMA.TABLE;
Index file ALTER TABLE SCHEMA.TABLE ADD CONSTRAINT SCHEMA.TABLE_C30SNE18 FOREIGN KEY (
Copy 01 TABLE.
Load -- |