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
LANGUAGE COBOL
EXTERNAL NAME 'TESTPROC!TESTPROC'
FENCED
NOT THREADSAFE
NO DBINFO
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).
and
EXEC SQL
CALL TESTPROC (:PROCERR, :PROCERRMSG, :PARM1)
END-EXEC

The called program (stored proc) has its linkage section defined as
PROCEDURE DIVISION USING PROCERR
PROCERRMSG
PARM1.

01 PROCERR PIC S9(9) COMP-5.
01 PROCERRMSG PIC X(254).
01 PARM1 PIC X(111).

It is a dll and is placed in the SQLLIB\FUNCTION directory.

All the stored proc currently does is
MOVE 'ZZZ' TO PROCERRMSG
GOBACK.
the problem: I never see the 'ZZZ' in the PROCERRMSG field in the calling program.

Any thoughts?

DB2 UDB 8.1 running on W2000 sp4.

Calling machine is XP pro.

I have tried both Realia Cobol and IBM VA Cobol 2.2.2.