I've been trying the following in DB2/LUW since version 8.2 (9.1 and now
9.5) and I've never been able to get this to work. (Not this exact SP,
which didn't exist prior to version 9, but just any SP that returns result
sets.)
Take the following COBOL program:
IDENTIFICATION DIVISION.
PROGRAM-ID. DBLOAD.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
CONSOLE IS CONSOLE