Cobol copy book -- covert as SQL stmt

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
murur
Participant
Posts: 19
Joined: Wed Apr 14, 2004 7:55 am

Cobol copy book -- covert as SQL stmt

Post 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
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post 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.
Post Reply