Specifying CALL . . . RETURNING
You can specify the RETURNING
phrase
of the CALL
statement for calls to C/C++ functions or to COBOL subroutines.
The RETURNING
phrase
has the following format.
CALL . . . RETURNING dataname2
The return value of the called program is stored into dataname2.
You must define dataname2 in the DATA DIVISION
of
the calling program. The data type of the return value that is declared
in the target function must be identical to the data type of dataname2.