Copybook to DataStage schema file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
leomauer
Premium Member
Premium Member
Posts: 100
Joined: Mon Nov 03, 2003 1:33 pm

Copybook to DataStage schema file

Post by leomauer »

Does anybody know a UNIX command line utility that allows to convert COBOL copybook to DataStage schema files?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I am not sure if one exists and if it does then pardon my ignorance. I know there are some softwares out there that will read a copy book and convert it into xml. You will have to cook something up. Would'nt be hard to create a shell script that achieves this.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
suryapkakani
Participant
Posts: 47
Joined: Wed Aug 20, 2008 7:31 am
Location: New jersey

Post by suryapkakani »

Found this on search http://sourceforge.net/projects/cb2xml/. A java parser job can be used to populate the required.
sunny
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Import the COBOL copybook into DataStage. Then open the table definition, go to the Layout tab, open the Parallel option and (right click to) save the record schema in a file. Voila!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
leomauer
Premium Member
Premium Member
Posts: 100
Joined: Mon Nov 03, 2003 1:33 pm

Post by leomauer »

ray.wurlod wrote:Import the COBOL copybook into DataStage. Then open the table definition, go to the Layout tab, open the Parallel option and (right click to) save the record schema in a file. Voila! ...
I know it is that simple. Unfortunately I need to do it dynamically before the job runs. I use this schema file in the job. It is not xml I am converting to, but really a schema file.
Any idea? I am writing DataStage job to do it, but there is too many variations in copybook syntax that it is going to be difficult.
Post Reply