Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing a stored procedure on iseries from Crystal

Status
Not open for further replies.

jareveille

IS-IT--Management
Jul 11, 2008
1
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top