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



Number of records is also available in the INFDS:

      * INFDS for database file. FileSize will contain the number 
      * of records in the file when the file is opened. 
     DINFDS            DS 
     D FILESIZE              156    159B 0        
 

_______________________
Booth Martin
boothm@earth.goddard.edu
http://www.spy.net/~booth
_______________________




Raul Jager <raul@abc.com.py>
Sent by: owner-rpg400-l@midrange.com
02/17/2000 08:31 AM
Please respond to RPG400-L

 
        To:     RPG400-L@midrange.com
        cc: 
        Subject:        Re: Record Number


You can get the records with their numbers using a DO - Chain, deleted
records will give "not found"  I have a small subrutine that gives the
total number of records in any file,  I can send you a copy.

Sample code:

F FileName  IU           Disk    /*  NO K */

C   1          Do    FileSize          RecN
C   RecN       Chain FileName
C              If    %found
C---- your process...
C              End... 
__________________________________________________________
Anton Gombkötö wrote:
> 
> >I purposely did not put in the 'K' in the F-Specs
> OK. This wasn't clear to me.
> 
> >thinking that
> >this would process them in record number sequence.
> Not exactly, you access the file via relative record numbers, that has 
not
> necessarily to be in sequence. But maybe this is just a language 
problem..
> :-) (mine)
> 
> >Was I
> >wrong in this assumption?  If there is a key attached to the file,
> >and I use the 'K' spec, doesn't' it then process it in key order
> >instead of sequential order?
> Of course, with the 'K' you declare your wish to access the file via 
it's
> key.
> 
> Best regards,
> 
> Anton Gombkötö

-- 
  Raul A. Jager W.
Asuncion - Paraguay
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: 
david@midrange.com
+---




+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.