Hello all,
I have a weird situation here. We are on an ISeries AS400. We have created an SQL table and can access it just fine when the COBOL program is called directly. The problem exists when the process is invoked with a stored procedure. The stored procedure calls a CL and then the COBOL program, but the SQL statement fails during this process.
Am I missing something, why does it work when the COBOL progam is invoked without using the stored procedure, but not when the stored procedure is the start of the process?
Here is a copy of the stored procedure.
DROP PROCEDURE SpInput; /* Old Store Procedure */
DROP PROCEDURE SpRate;
CREATE PROCEDURE SpRate (
InOut ChadWrk1_1 CHAR(32000),
InOut ChadWrk1_2 CHAR(32000),
InOut ChadWrk1_3 CHAR(32000),
InOut ChadWrk1_4 CHAR(32000),
InOut ChadWrk1_5 CHAR(32000),
InOut ChadWrk1_6 CHAR(7458),
OUT CHARINST_A CHAR(1420),
OUT CHARFEES_A CHAR(260),
OUT BALANCE DECIMAL(9,2))
LANGUAGE CL
SPECIFIC SpRate
NOT DETERMINISTIC
NO SQL
EXTERNAL NAME RATECL
PARAMETER STYLE GENERAL;