Converting the compound control structure of PERFORM and GOTO statements in the code translation. (Chinese. English summary) Zbl 1109.68392

Summary: COBOL, a traditional language, has been presented for more than 50 years. There are at least 100 billion lines of legacy codes written in COBOL up to now. An effective way to maintain these legacy codes is to translate them into modern languages, such as Java. While translating, it is a key-step to eliminate ‘GOTO’ and ‘PERFORM’ and their compound control structures in COBOL programs. A method which uses ‘switch’ and ‘while’ statements is proposed in this paper instead of ‘GOTO’ and ‘PERFORM’ and their compound control structures. It preserves the readability because the target Java program has similar control structures. The code size of the target program expands only 2 times in average. This method is applied in the ‘C2J translation system’. It is proved sound and effective since 4 million lines of real COBOL program have been translated and its target program has passed the test.


68N15 Theory of programming languages