Overview

The Java language defines its own data types, which are different to the ones used in COBOL. The COBOL run-time system automatically converts between COBOL and Java types whenever you call Java from COBOL or COBOL from Java, as shown below.

Figure 1. Mapping data between COBOL and Java
Mapping data between COBOL and Java

Numeric data types are converted in the same way whether the COBOL program is a procedural program, or OO COBOL. Objects and strings are converted differently, depending on whether you are using procedural COBOL or OO COBOL.

OO COBOL handles Java objects as COBOL object references, but procedural COBOL handles them as pointers.