Page 1 of 1

Copybook to DataStage schema file

Posted: Wed Feb 17, 2010 8:21 am
by leomauer
Does anybody know a UNIX command line utility that allows to convert COBOL copybook to DataStage schema files?

Posted: Wed Feb 17, 2010 9:27 am
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.

Posted: Wed Feb 17, 2010 11:50 am
by suryapkakani
Found this on search http://sourceforge.net/projects/cb2xml/. A java parser job can be used to populate the required.

Posted: Wed Feb 17, 2010 1:37 pm
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!

Posted: Wed Feb 17, 2010 6:48 pm
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.