高级检索

    Cobol到Java翻译中的数据类型转换方法

    Mapping Cobol Data to Java Type System with Functional Equivalence

    • 摘要: 将Cobol代码迁移到新的平台,如Java是减轻Cobol代码维护负担的一个有效方法.怎样将Cobol数据平滑迁移到新平台则是必须解决的基本问题之一.以前的大部分研究工作都直接将Cobol数据映射到现代程序设计语言中的基本数据类型,比如int,float等.但是,这种简单映射并不能保持原来的Cobol语义,从而导致目标码并不能与原来的代码运行一致.首先利用数据抽象技术对Cobol数据进行初步建模,在此基础上进一步提出了一个纯Java的功能等价的封装方法,可以有效地将Cobol数据描述映射到Java类型系统.该方法已经在一个Cobol2Java翻译系统——C2J翻译器中得到实现,并且应用于一个近400万行的真实银行商用系统.实验结果表明,此方法可以在保持功能等价的情况下,将Cobol数据无需手工干预地迁移到Java平台.

       

      Abstract: Migrating the Cobol code to a new platform such as Java is an effective method to alleviate the burden of maintenance of the Cobol code. How to migrate Cobol data to the new platform is one of the basic problems to be solved. Most research work directly casts Cobol data to primitive data type such as int or float in modern programming language. However, this simple data mapping method doesn't keep the Cobol semantic and thus makes the translated code run inconsistently with the original Cobol code. In this paper, a pure Java encapsulating method is presented using the data modeling technology to map the Cobol data to Java type system with functional equivalence. Based on this method, a Cobol2Java translator is implemented. The translator is also applied to a real business system of about 4 million lines of Cobol code. Test results show that this tool could translate the Cobol system to Java successfully and without any human interaction.

       

    /

    返回文章
    返回