× 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 question
  • From: DAsmussen@xxxxxxx
  • Date: Fri, 22 Aug 1997 17:43:38 -0400 (EDT)

Marcel,

In a message dated 97-08-22 07:22:55 EDT, you write:

> How can I find out how many records OPNQRYF has selected in a CLP?
>  
>  I use OVRDBF with SHARE(*YES), OPNQRYF and a ILE RPG program.
>  
>  I've tried RTVMBRD NBRCURRCD() and the INFDS in the RPG (number of
>  records in the member at open-time at offset 75), but both give me the
>  *original* number of records, not the selected number.
>  I've also tried to receive the message CPI4304 (nn records selected)
>  from the *PGMQ (which I can see on the display). But I only receive
>  CPC4001 (completion message: file opened).

Hmmm.  I don't think that there is a pretty way to do this.  Two come to
mind, but both could use a little help.

1.  I don't know if this is viable, but you could try using RCVMSG to trap
the message that tells how many records were selected.  Since you want RPG,
this is probably not the answer.
2.  Use the CPYFRMQRYF command to send your selected data to a physical file,
and then do the RTVMBRD on the copied data.

HTH,

Dean Asmussen
Enterprise Systems Consulting, Inc.
Fuquay-Varina, NC  USA
E-Mail:  DAsmussen@AOL.COM

"I think of life as a good book.  The further you get into it, the more it
begins to make sense." -- Harold S. Kushner
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.