java调用cobol,从Java读取cobol数据结构

Is there a way to read cobol data in a Java program? More concretely I'm confronted with the following case:

I have a file with fixed length records of data. The data definition is done as Cobol copybooks. What I think of is a library which taking into account the copybooks would be able to read those records.

Ideally it should be possible to generate basic java classes and structures based on the copybook information. In a later step the datarecords would be parsed and the data filled into objects of those generated classes.

Do you know a library providing this kind of functionality? Or any other techniques to cope with the problem of reading cobol data?

There are some commercial tools which provide this functionality. They are, however, very expensive. Do you know any open-source alternative or a combination of different tools to provide the entire functionality? For example the cb2xml reads copybook structures and transforms them into xml. A later step would be to generate a record reader based on the cb2xml xml information. Or to use a record reader which is configurable. Do you know a cobol record reader (decoder)?

解决方案

You could look at JRecord - http://sourceforge.net/projects/jrecord/

or cb2java http://sourceforge.net/projects/cb2java/ both allow you to access cobol files

but neither will generate the full classes.

Since the original Answer:

JRecord continues be developed. There is now a JRecord Code generator available as

either a standalone program or in the Recordeditor.

This Code Generator will build JRecord JRecord code from a Cobol Copybook.

See RecordEditor Jrecord CodeGen

Development on cb2java has stopped

cobol2j has been written. There have been no updates

for a year.

There is also Legstar again nothing published for a few years

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值