jareveille
IS-IT--Management
I am trying to access a stored procedure on an iSeries from Crystal Reports version X1
The stored procedure:
CREATE PROCEDURE PGMRJR/STR401KT1
(IN YEAR CHARACTER(4),
IN QTR CHARACTER(1),
IN ILIMIT DECIMAL(13,2))
DYNAMIC RESULT SETS 1
LANGUAGE RPGLE
SPECIFIC PGMRJR/STR401KT1
NOT DETERMINISTIC
MODIFIES SQL DATA
CALLED ON NULL INPUT
EXTERNAL NAME 'PGMRJR/RS700'
PARAMETER STYLE GENERAL WITH NULLS
RS700 is an SQLRPGLE program on the iseries. The program does run and creates a data file, but the server cannot seem to return the results.
Below is the code in the SQLRPGLE program to return the cursor.
0176.00 C $RESULTSET BEGSR
0177.00 C
0178.00 C/EXEC SQL
0179.00 C+ DECLARE C1 CURSOR WITH RETURN TO CLIENT FOR
0180.00 C+ SELECT * FROM QTEMP/RS700WF@
0181.00 C+ FOR FETCH ONLY
0182.00 C/END-EXEC
0183.00 C/EXEC SQL
0184.00 C+ OPEN C1
0185.00 C/END-EXEC
0186.00 C/EXEC SQL
0187.00 C+ SET RESULT SETS FOR RETURN TO CLIENT CURSOR C1
0188.00 C/END-EXEC
0189.00 C
0190.00 C ENDSR
The stored procedure:
CREATE PROCEDURE PGMRJR/STR401KT1
(IN YEAR CHARACTER(4),
IN QTR CHARACTER(1),
IN ILIMIT DECIMAL(13,2))
DYNAMIC RESULT SETS 1
LANGUAGE RPGLE
SPECIFIC PGMRJR/STR401KT1
NOT DETERMINISTIC
MODIFIES SQL DATA
CALLED ON NULL INPUT
EXTERNAL NAME 'PGMRJR/RS700'
PARAMETER STYLE GENERAL WITH NULLS
RS700 is an SQLRPGLE program on the iseries. The program does run and creates a data file, but the server cannot seem to return the results.
Below is the code in the SQLRPGLE program to return the cursor.
0176.00 C $RESULTSET BEGSR
0177.00 C
0178.00 C/EXEC SQL
0179.00 C+ DECLARE C1 CURSOR WITH RETURN TO CLIENT FOR
0180.00 C+ SELECT * FROM QTEMP/RS700WF@
0181.00 C+ FOR FETCH ONLY
0182.00 C/END-EXEC
0183.00 C/EXEC SQL
0184.00 C+ OPEN C1
0185.00 C/END-EXEC
0186.00 C/EXEC SQL
0187.00 C+ SET RESULT SETS FOR RETURN TO CLIENT CURSOR C1
0188.00 C/END-EXEC
0189.00 C
0190.00 C ENDSR