× 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 did not put a K on the spec, and that is assumably the problem. I found 
that, due to other checksums on related files, it would be necessary to read 
through the entire file anyways, so I just added the counter to the loop. 

When the project is done, I will try this just so I can add it to my 
toolbox. Thanks! 

On 8/18/05, Peter Dow (ML) <maillist@xxxxxxxxxxxxxxx> wrote:
> 
> Hi Tony,
> 
> That's interesting. An associate of mine wrote a program back in the dark
> ages (1985) that uses the technique, and it works for me -- I just tested
> it. The physical had 616,000+ records; the logical had 3,711, and the
> program reports back 3,711 for the logical.
> 
> Perhaps you did not put a "K" on the file spec? Take a look at this code
> http://code.midrange.com/index.php?id=8f8205650e written in RPG that does
> the job.
> 
> hth,
> Peter Dow
> Dow Software Services, Inc.
> www.dowsoftware.com <http://www.dowsoftware.com>
> 909 793-9050 voice
> 909 793-4480 fax
> 
> 
> > -----Original Message-----
> > From: rpg400-l-bounces+maillist=dowsoftware.com@xxxxxxxxxxxx
> > [mailto:rpg400-l-bounces+maillist=dowsoftware.com@xxxxxxxxxxxx]On Behalf
> > Of Tony Carolla
> > Sent: Thursday, August 18, 2005 1:18 PM
> > To: RPG programming on the AS400 / iSeries
> > Subject: Re: LF Index Entries and QUSRMBRD
> >
> >
> > Actually, when you look in the INFDS of a logical file, it shows
> > the total
> > number of records in the BASED ON file, and does not show you the
> > count of
> > records filtered by the LF.
> >
> > On 8/18/05, Peter Dow (ML) <maillist@xxxxxxxxxxxxxxx> wrote:
> > >
> > > Hi Tony,
> > >
> > > Assuming that the logical file has selection criteria so that it only
> > > includes the records where the date field is not *LOVAL, then
> > the number
> > > of
> > > records in the file is the number of index entries.
> > >
> > > In CL you could use RTVMBRD NBRCURRCD, or in RPG, use the file
> > status data
> > > structure to get the number of records at open, i.e. pos.
> > 156-159 binary.
> > >
> > > hth,
> > > Peter Dow
> > > Dow Software Services, Inc.
> > > www.dowsoftware.com <http://www.dowsoftware.com> <
> http://www.dowsoftware.com>
> > > 909 793-9050 voice
> > > 909 793-4480 fax
> > >
> > > > -----Original Message-----
> > > > I am writing a balancing/checksum program, and there is an
> > account file
> > > (PF)
> > > > with a date field. I want a count of all records where this date 
> field
> > > isn't
> > > > *LOVAL. I could simply create an LF, then read and count the 
> records,
> > > but
> > > I
> > > > notice that, once I create the LF, I can DSPFD it, and get
> > the 'Number
> > > of
> > > > index entries' from the display. So I want my program to use
> > an API to
> > > get
> > > > this info, and avoid any File I/O.
> > > >
> > > > I looked at QUSRMBRD, and I see the Current number of records
> > field in
> > > the
> > > > MBRD0200 format, but this is not what I am looking for. Has
> > anybody else
> > > > accomplished this, perhaps with a different API?
> > >
> > > --
> > > No virus found in this outgoing message.
> > > Checked by AVG Anti-Virus.
> > > Version: 7.0.338 / Virus Database: 267.10.12/77 - Release Date:
> > 8/18/2005
> > >
> > >
> > > --
> > > 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.
> > >
> > >
> >
> >
> > --
> > "Enter any 11-digit prime number to continue..."
> > "In Hebrew SQL, how do you use right() and left()?..." - Random Thought
> > "If all you have is a hammer, all your problems begin to look like 
> nails"
> > --
> > 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.
> >
> >
> > --
> > No virus found in this incoming message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.338 / Virus Database: 267.10.12/77 - Release Date: 
> 8/18/2005
> >
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.12/77 - Release Date: 8/18/2005
> 
> 
> --
> 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 ...

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.