Page 1 of 1

Cobol copy book -- covert as SQL stmt

Posted: Mon Jun 07, 2004 2:08 pm
by murur
I am creating a data model to create Relation Schema (DB2 - UDB). Lot of required information available as Cobol Copybook. Is there any Utility avaialbe to convert the Cobol Copy book into SQL (Create table) statment.....


Thanks,
Muru

Posted: Mon Jun 07, 2004 7:17 pm
by vmcburney
Your cobol copybook could be a complex flat file structure and may not map directly to a single relational database table. To get a better idea of the structure import it via the DataStage manager as a complex flat file (CFF) table definition. To see view table definition in a tree heirarchy add a CFF stage to a server job and load in the saved table definition, you can then view the structure on the CFF stage tabs.

To create your target table definition drag the required cobol fields within the CFF stage to the output column, note that you can focus on just one part of the hierarchy, and then link this CFF stage to an output database stage. The output datastage stage will automatically create the create table and drop table commands once DDL is enabled.

If you have a complex structure with multiple record formats then have one output from your CFF stage for each format type to build the multiple database tables.