MFPLI00201S A reference to the function "entry-name" would return a STRUCTURE or array value but the declaration of the aggregate type returned contains non-constant extents.

Functions can be declared to return an aggregate by using the TYPE attribute in the RETURNS option only if the referenced type definition contains only constant extents.
Resolution:
Ensure the referenced type definition contains only constant extents.