0

I have to convert Cobol copybooks into Sql server create statement.

Sample CopyBook : Click Here for sample Copybook

  • 2
    Welcome to stackoverflow.com. Please take some time to read the [help pages](https://stackoverflow.com/help), especially the sections named ["What topics can I ask about here?"](https://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](https://stackoverflow.com/help/dont-ask). Also please take the [tour](https://stackoverflow.com/tour) and read about [how to ask good questions](https://stackoverflow.com/help/how-to-ask). Lastly please learn how to create a [Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/mcve). – cschneid Oct 10 '17 at 14:02
  • 1
    on top of what @cschneid has said, post a text version of the copybook. Most people wont look at pictures of code or copybooks – SaggingRufus Oct 10 '17 at 17:08
  • What languages are you comfortable with ??? – Bruce Martin Oct 10 '17 at 21:00
  • C# and ETL tool SSIS – Madhu Arasur Oct 11 '17 at 06:18

1 Answers1

1

cb2xml

If you have a lot of copybooks to process, you could look at cb2xml. It can convert a Cobol Copybook to Xml. The cb2xml package has very basic examples of processing the Xml written in java / python / jython / ruby / Groovy. It is easier processing the Cobol in a JVM language.

Have a look at this question Dynamically Reading COBOL Redefines with C# and the answer.

CobolToCsv

For simple single-record copybooks you could use coboltocsv to convert the Cobol file to Csv and process as a Csv file.

Note: I maintain cb2xml and coboltocsv

Bruce Martin
  • 10,358
  • 1
  • 27
  • 38