Previous Topic Next topic Print topic


Type Mappings from Native COBOL to Managed Code

COBOL data items are exposed as managed types, when the code is compiled with the ILSMARTLINKAGE directive.

COBOL data items are exposed as the following managed types, when the code is compiled with the ILSMARTLINKAGE directive:

Native COBOL C# type Java type Managed COBOL
PIC X(n) string String string
PIC S9(n) where n <= 2 sbyte byte binary-char
PIC 9(n) where n <= 2 byte byte binary-char unsigned
PIC S9(n) where 2 < n <= 4 short short binary-short
PIC 9(n) where 2 < n <= 4 ushort short binary-short unsigned
PIC S9(n) where 4 < n <= 9 int int binary-long
PIC S9(n) where 4 < n <= 9 uint int binary-long unsigned
PIC 9(n) where 9 < n <= 19 long long binary-double
PIC 9(n) where 9 < n <= 19 ulong long binary-double unsigned
PIC 9(n)V9(m) decimal

See JVMDECIMAL

decimal
COMP-1 float float float-short
COMP-2 double double float-long
PIC Z9 (and any numeric edited) string String string
PIC A(n) string String string
Group item string String string
Previous Topic Next topic Print topic