当前位置: 动力学知识库 > 问答 > 编程问答 >

Generating COBOL code with C#

问题描述:

I have to generate COBOL code with C# but I haven't got suitable ideas how I could tackle this problem.

The only idea which I have was to generate the COBOL code as plain text but I think this isn't really efficient.

Are there any other/better ways? Could anyone provide an approach for me?

I would be also glad to hear about the smallest tips.

For your information: The data, which I need for the COBOL code I get from a PDF file. Unfortunately I am not able to use Cobol.NET.

The main goal is that a user is able to open a PDF file in the C# program. This PDF file is an empty form where the user have to place several kind of data on it. After editing this form the user must press a button 'run'. The 'run'-button trigger an event which translate the data into COBOL code. Now the COBOL code should contain the data types, values and coordinates of the used fields (data). The coordinates identify the place where the fields should printed on the formular.

网友答案:

If you're using Visual Studio I'd suggest looking into T4 Templates. They allow you to specify the format of your output as it will appear and write C# to manipulate that output.

分享给朋友:
您可能感兴趣的文章:
随机阅读: