We currently have many stored procs written in cobol and residing on a vm system. They are successfully called from windows based clients. I am now attempting to migrate the db from vm to windows. I am compiling the stored procs on windows using IBM's VA Cobol and following all of the (sometimes conflicting) documentation I can find.
When I call one of the stored procedures all appears to have gone well (sqlcode returned = 0) except that I get absolutely nothing back in the passed fields. The db at least appears to be at least attempting to load the dll as I can see the disk light go on.
This is the stored proc declaration I have used.
CREATE PROCEDURE TESTPROC
(INOUT PROCERR INTEGER,
INOUT PROCERRMSG CHAR(254),
INOUT PARM1 CHAR(111))
RESULT SETS 0
MODIFIES SQL DATA
EXTERNAL NAME 'TESTPROC!TESTPROC'
PROGRAM TYPE SUB
PARAMETER STYLE GENERAL;
The calling program uses
01 PROCERR PIC S9(9) COMP-5.
01 PROCERRMSG PIC X(254).
01 PARM1 PIC X(111).
CALL TESTPROC (:PROCERR, :PROCERRMSG, :PARM1)
The called program (stored proc) has its linkage section defined as
PROCEDURE DIVISION USING PROCERR