Method Signatures Defined by Managed COBOL Programs

The type of a COBOL parameter may be specified by:

  • Referencing the type explicitly in the PROCEDURE DIVISION phrase using the AS syntax
  • Declaring a linkage section item with a given type and referencing that linkage section item in the PROCEDURE DIVISION USING phrase

For REFERENCE and OUTPUT parameters, managed types are exposed directly as managed pointers to the corresponding managed type. COBOL data types that do not correspond to managed types (such as PIC X fields, groups, numeric fields other than BINARY-LONG and so on) are exposed as COBOL pointers.

For VALUE parameters, and RETURNING items, types are exposed as follows:

COBOL types: are exposed as:
Managed types objects of the corresponding type
Numeric items with more than 19 decimal digit positions MicroFocus.COBOL.Program.BigDecimal
Numeric items with implied decimal point, such as PIC 9(9)v99, all sizes - com.microfocus.cobol.program.ScaledInteger in JVM COBOL
Unsigned numeric items with no implied decimal point: In .NET COBOL:
  • < 3 numeric digits - unsigned int8
  • < 5 numeric digits - unsigned int16
  • < 10 numeric digits - unsigned int32
  • < 19 numeric digits - unsigned int64

In JVM COBOL, they are exposed the same as signed numeric items.

Signed numeric items with no implied decimal point:
  • < 3 numeric digits - int8
  • < 5 numeric digits - int16
  • < 10 numeric digits - int32
  • < 19 numeric digits - int64
All other types PIC X, group and so on string