Hi, I am wondering if any body could help me out with a specific problem I am facing. I have a VB program which interfaces with AS/400. I need to call an SQL stored procedure which in trun calls an SQLRPGLE program. What I need to do is to pass a result set from SQLRPGLE to the VB program. This result set has to be processed with in the VB application. I created a stored procedure as follows: ----------------------------------------------- CREATE PROCEDURE BWIR/RESON(INOUT state CHAR ( 5)) RESULT SETS 1 NOT DETERMINISTIC READS SQL DATA EXTERNAL NAME BWIR/REASON PARAMETER STYLE GENERAL
------------------------------------------------ BWIR is the libraray name RESON is the stored procedure name REASON is the SQLRPGLE program name. Here is the SQLRPGle program ----------------------------------------------------------------- FRsnmstl0 IF E K DISK * Reason master file St. Louis. C *ENTRY PLIST C PARM STATE 5 C/EXEC SQL DECLARE RCURSOR CURSOR FOR C+ SELECT * FROM RSNMSTL0 C/END-EXEC C/EXEC SQL OPEN RCURSOR C/END-EXEC * C/EXEC SQL SET RESULT SETS CURSOR RCURSOR C/END-EXEC * C IF SQLSTT = '02000' C EVAL STATE = 'ERROR' C RETURN C ELSE C EVAL *INLR = *ON C RETURN C ENDIF
----------------------------------------------------------- What I am expecting is that the RPG program should return the result set to the stored procedure and then the stored procedure should return it back to the VB application. It will be great if any one could help me out... Thanks in Advance, Arun. My mail id arun.kg@marquip.com