The RETURNING phrase specifies a data item that is to receive the program or method result.
In a method procedure division header, the data type of data-name-2 must be one of the types supported for Java interoperation, as listed in Interoperable data types for COBOL and Java.
The RETURNING data item is an output-only parameter. On entry to the method, the initial state of the RETURNING data item has an undefined and unpredictable value. You must initialize the PROCEDURE DIVISION RETURNING data item before you reference its value. The value that is returned to the invoking routine is the value that the data item has at the point of exit from the method. See RETURNING phrase for further details on conformance requirements for the INVOKE RETURNING identifier and the method RETURNING data item.
Do not use the procedure division RETURNING phrase in: