|
Hi, > Prior to V5R3 the program worked fine. Now, when they run > it the first time, it works fine, but the next time they > run it it produces no results, as if it started reading at > the EOF. Did you define a serial or a scroll cursor? If you use a serial cursor, you have to close it at the end, otherwise it cannot be repositioned, that means a new OPEN will have no effect. To make sure, that the cursor is really closed, I normally close it immediatedly before the OPEN statement. A new activation group forces hard closes of all cursors at the end of the program. An other way to force hard closes at the end of a module is to set the option CLOSQLCSR in the compile command to *ENDMOD. From the view of the performance, both methods are not ideal, because an ODP (open data path) cannot be reused in subsequent executions. Birgitta Mit freundlichen Grüßen i.A. Birgitta Hauser LUNZER + PARTNER GMBH Unternehmensberatung Carl-Zeiss-Straße 1 63755 Alzenau Tel: + 49 6023 951-255 Fax: + 49 6023 951-111 Internet. www.lp-gmbh.com www.rpg-schulung.de "If you think education is expensive, try ignorance" (Derek Bok) -----Ursprüngliche Nachricht----- Von: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Barbara Morris Gesendet: Samstag, 28. Januar 2006 01:47 An: midrange-l@xxxxxxxxxxxx Betreff: Re: SQL Cursor Position Problem in V5R3? Brad Stone wrote: > > I am working with a customer who is having a problem with > what seems like a cursor position problem using embedded > SQL. > > Prior to V5R3 the program worked fine. Now, when they run > it the first time, it works fine, but the next time they > run it it produces no results, as if it started reading at > the EOF. > It might be an activation group difference, if the program is created with CRTPGM and the ACTGRP parameter is not specified. Prior to V5R3, a simple CRTPGM always created a program in *NEW activation group. In V5R3 it was changed so that the default value used for the ACTGRP parameter depends on the type of program-entry module. For RPGLE modules, the default is QILE, not *NEW.
As an Amazon Associate we earn from qualifying purchases.
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.