×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




RTFM

You need to explicitly create the cursor to be returned.

BEGIN
  DECLARE c1 CURSOR WITH RETURN FOR 
    SELECT cusnam FROM customer ORDER BY cusnam;

  OPEN c1;
END

HTH,

Charles Wilt
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
 

> -----Original Message-----
> From: midrange-l-bounces@xxxxxxxxxxxx
> [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Adam Lang
> Sent: Wednesday, April 06, 2005 10:47 AM
> To: Midrange Systems Technical Discussion
> Subject: Creating stored procedure in iSeries Navigator
> 
> 
> I created an INSERT type stored procedure fine earlier.  Now,  was
> going to create a simple select statement stored prcoedure to return a
> resultset, but iseries navigator is giving me the following error when
> I try to hit "OK" after I put in the SQL statement.
> 
> SQL procedure, function, or trigger SELECT_TYPE in CLSDFILES 
> not created.
> 
> Message ID: SQL7032
> 
> Cause . . . . . :   SQL procedure, function, or trigger SELECT_TYPE in
> CLSDFILES was not created. The compile was not successful. SQL creates
> an SQL procedure, function, or trigger as a C program that contains
> embedded SQL.  Errors not found during the initial parsing of the
> CREATE PROCEDURE, CREATE FUNCTION, or CREATE TRIGGER statement can be
> found during the precompile.
> 
> 
> This is what I have entered in the SQL Statement tab:
> SELECT * FROM closedfiletypes
> 
> for the General tab I have:
> SELECT_TYPE for the procedure and READS SQL data for the data 
> access type.
> 
> 
> any ideas?
> 
> -- 
> "Remember, that I am thy creature; I ought to be thy Adam; but I am
> rather the fallen angel, whom thou drivest from joy for no misdeed. 
> Every where I see bliss, from which I alone am irrevocably excluded. 
> I was benevolent and good; misery made me a fiend.  Make me happy, and
> I shall again be virtuous."
>         - The Creature, Frankenstein
> -- 
> This is the Midrange Systems Technical Discussion 
> (MIDRANGE-L) mailing list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
> 
> 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.