IBM states that DB2 supports up to 16 levels of nesting. It appears that when a Stored Procedure written in COBOL using conventional linkage, data from a procedure beyond the second level of nesting is not returned.
i.e. Stored Procedure A calls Stored Procedure B which calls Stored Procedure C. The data that Stored Procedure C moves to a field in it’s linkage is not visible to the working storage in Stored Procedure A on return. All the Stored Procedures are written in COBOL with theconventional Procedure Division Using and Linkage Section.
This seems odd that DB2 supports 16 levels of nesting but data from nested calls is not returned.
Is this a limitation with COBOL?
Is there some COBOL work around?
Is there something that may have be missed in or defined incorrectly in the DDL statements defining the Stored Procedure to DB2?