IBM Extension

GIVING/RETURNING phrase

The GIVING/RETURNING phrase is not allowed for programs called with a linkage type of program. GIVING and RETURNING are equivalent.
identifier-4
The RETURNING data item which must be defined in the DATA DIVISION. The return value of the called program is implicitly stored into identifier-4. Identifier-4 cannot be reference modified.

Identifier-4 can be a date-time data item.

ADDRESS OF special register
For information about this special register, see page ADDRESS OF Special Register.
You can specify the RETURNING phrase on calls to ILE procedures that return a value. If you specify the RETURNING phrase on a CALL to a COBOL subprogram:

If an EXCEPTION or OVERFLOW occurs, identifier-4 is not changed.

The existence of the RETURNING phrase has no effect on the setting of the RETURN-CODE special register.

Items referenced in the RETURNING/GIVING phrase of the CALL statement cannot contain the TYPE phrase.

End of IBM Extension