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


  • Subject: Re: OPNQRYF record count
  • From: Buck Calabro/commsoft<mcalabro@xxxxxxxxxxxx>
  • Date: Wed, 10 Mar 1999 15:07:45 -0500

On 03/10/99 01:45:22 PM "David Prowak"  wrote:

>How about doing a CPYFRMQRYF to a file in QTEMP.
>Then 
>RTVMBRD    FILE( QTEMP/WHATEVER) NBRCURRCD(&NBRRCD) 
>so that  &NBRRCD will have what your looking for. 

If the OPNQRYF returns a million records, that CPYFRMQRYF will run a 
loooong time.  Ask me how I found out!  If you go with CPYFRMQRYF, specify 
NBRRCDS(1) :-)

Another solution: call an RPG program that reads the first record out of 
the access path.  If it exists, do a *LOVAL SETLL (to reposition the file 
pointer) and set your return code to "have data."  If it does not exist, 
set your return code to "no data."  Alternately, do a POSDBF in your CL to 
move the file pointer back to the first key/record.  Yes, it's another 
program, but at least it's a generic one, and performace is good whether 
your access path has zero or a million records.  The beauty of that is that 
you can get some interesting stuff from the INFDS once the file is opened.

Buck Calabro
Billing Concepts Inc (formerly CommSoft), Albany, NY
mailto:mcalabro@commsoft.net
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-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.