Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Type assignment

The table below presents an overview of the Java classes present in the framework together with a brief description of the COBOL types for which the classes are used.

Java class

Description

DataType

Basic class for all conversion classes

CobolRecord

Basic class for COBOL structures

PicX

For alphabetical/alphanumerical COBOL types: PIC X(n)

PicN

For national COBOL types: PIC N(n)

Pic9

For positive, integer numerical COBOL types: PIC 9

Pic9COMP

For integer numerical COBOL types: PIC S9(n) and PIC 9(n) USAGE [COMP, BINARY, COMP-5]

PicU

For COBOL types for which Cobol2Java offers no special data conversion classes. The data is made available in the Java program without conversion as a byte array.

The directory api-doc contains the documentation for these classes.

The table below indicates the support provided for the various COBOL types and clauses:

COBOL clause

Java support

Data structures with level numbers

CobolRecord

Pic X (n) (alphanumerical)

PicX

Combinations of A, X, 9 (not only 9)

PicX

Pic 9 (n) (numerical)

Pic9

Pic N (n) (national)

PicN

BINARY, COMP, COMP-5

Pic9Comp for PIC9(1)to PIC9(18)
Not supported:
PIC 9(19) to PIC 9(31) is mapped to PicU

COMP-1, COMP-2, COMP-3

Not supported.

Alphanumerical, ready for printing
Alphabetical, ready for printing

Mapped to PicX.
The preparation mask is ignored.

Numerical, ready for printing

Not supported. Mapped to PicU.

BLANK WHEN ZERO

Not supported. Mapped to PicU.

INDEX

Not supported.

POINTER; PROCEDURE POINTER, OBJECT REFERENCE

Not supported.

JUSTIFIED RIGHT

PicX, ignored.

SYNCHRONIZED

Supported.

Level number 77

Supported.

OCCURS

Limited support.

  • Dynamic arrays (OCCURS DEPENDING ON) are created with a fixed length.

  • OCCURS INDEXED BY, OCCURS KEY IS is not supported.

REDEFINES

Supported.

RENAMES

Supported.