Cobol到Java翻译中的数据类型转换方法  被引量:4

Mapping Cobol Data to Java Type System with Functional Equivalence

在线阅读下载全文

作  者:石学林[1] 张兆庆[1] 武成岗[1] 

机构地区:[1]中国科学院计算技术研究所,北京100080

出  处:《计算机研究与发展》2006年第2期336-342,共7页Journal of Computer Research and Development

基  金:国家自然科学基金项目(60103006)~~

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

关 键 词:Cob012Java 遗产代码 数据类型迁移 数据封装 代码维护 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象