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



We've always used SQLCOD for our conditioning.  If < 0 or = 100, then no
more records were fetched.

Anyway,  Are you clearing all the INTO fields before fetching them.  The
fetch will not clear those fields if records were not fetched.

Michael Schutte
Work 614-492-7419
email  michael_schutte@xxxxxxxxxxxx


                                                                           
             "rick baird"                                                  
             <rick.baird@gmail                                             
             .com>                                                      To 
             Sent by:                  "RPG programming on the AS400 /     
             rpg400-l-bounces@         iSeries" <rpg400-l@xxxxxxxxxxxx>    
             midrange.com                                               cc 
                                                                           
                                                                   Subject 
             03/31/2006 04:46          SQL fetch multiple records and      
             PM                        SQLER3                              
                                                                           
                                                                           
             Please respond to                                             
              RPG programming                                              
              on the AS400 /                                               
                  iSeries                                                  
             <rpg400-l@midrang                                             
                  e.com>                                                   
                                                                           
                                                                           




Hey all,

I'm doing an SQLRPGLE select - left outer join on two files and
fetching 13 records at a time to fill a subfile page.

the join has the possibility to have left side records without right
side records, and I'm taking that into account ( - alwnull(*usrctl)
and checking the null indicators of records fetched ).

my problem is that I need to know how many records I fetched so I know
when i'm at EOF.

I've always used SQLER3 to tell me this, but it's not working now.

The first fetch I do, my data structure has 13 records in it, and they
are the records I expected to get, but SQLER3 has 7 in it.

coincidently, record 8 is the first record with nulls in the right
side file fields.

what gives?  It fetched 13 records, but SQLER3 tells me only 7 were
fetched.

Any help would be appreciated.

Rick

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.