× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have an SQLRPGLE program.  Within it are several sub-procedures which
use SQL to populate subfile displays.  These sub-procedures do their SQL
processing like so:

--- start procedure--
DECLARE cursor1....
OPEN cursor1...
FETCH cursor1 INTO...
IF sqlcod=0
DOW sqlcod=0
write subfile entry
FETCH cursor1 INTO...
ENDDO
ENDIF
CLOSE cursor1
--- end procedure ---

The first time I go thru the sub-procedure everything is fine.  Files are
opened and closed as I expect, and can be verified with the 'WRKACTJOB,
Open files' display.  On subsequent passes thru the sub-procedures, the
CLOSE cursor1 doesn't work and the file is left open, and SQLCOD = *zeros.
 Everything else is find, the program executes the SQL CLOSE statement
(verified with STRDBG), but the file is left open.

Am I overlooking something?




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-2024 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.