• Subject: Re: OPNQRYF record count
  • From: "David Prowak" <prowakd@xxxxxxx>
  • Date: Wed, 10 Mar 1999 15:47:10 -0500

If you go with an RPG to read the INFDS, while saving on 
DASD intensive functions, you are adding:
    - Another program to the mix.  While trivial, it's still
      another program to keep track of and document it's use.
    - While not as DASD intensive as doing it in CL, you paying the
       cost of another program activation.
    - Sometimes it's easier in terms of future maintenance to just
       do everything in the CL, rather then splitting the functionality
       over 2 programs.


6 of 1, a half-dozen of another.
Dave
----------
> From: Randy Robb <rwrobb@pbsilink.com>
> To: MIDRANGE-L@midrange.com
> Subject: RE: OPNQRYF record count
> Date: Wednesday, March 10, 1999 2:09 PM
> 
> Instead of doing DASD intensive functions like RCVF or CPYFRMQRYF, why
not
> use RPG's File Information Data Structure INFDS to retrieve the Current
> number of records?
> In fact, you could write a small program to do this generically.
> 
> Define a file called Fxxx in F-specs, User Controlled open, with the
INFDS
> data structure specification in the continuation specs.
> In I-specs (for non-ILE RPG), describe the INFDS, filling the from/to
> positions of the current records field (map of INFDS can be found in RPG
> manual)
> In C-specs, receive the three parms (you can make allowance for MBR being
> blank to use *FIRST), then perform a CL command via QCMDEXC call to
override
> file Fxxx to the file named in passed parms.  Then, open the file,
retrieve
> the "Current Number of records" from INFDS.
>   Well, you could even use a fourth parameter to return this number to
the
> CLP (best passed as alpha and converted to decimal in the CL) to let the
CLP
> know number of records found WITHOUT  reading them for a count.
> 
> > -----Original Message-----
> > From: owner-midrange-l@midrange.com
> > [mailto:owner-midrange-l@midrange.com]On Behalf Of Ravi
> > Sent: Wednesday, March 10, 1999 10:15 AM
> > To: MIDRANGE-L@midrange.com
> > Subject: Re: OPNQRYF record count
> >
> >
> > Joe,
> >
> > You can RCVF in the CL and monitor for CPF0864
> > or
> > CPYFRMQRYF into a temp file and RTVMBRD to check number of records in
> > the member.
> >
> > Ravi
> > Joe Giusto wrote:
> > >
> > > Is there any way to see how many or if any records were selected with
an
> > > OPNQRYF statement.  I would need to know this before calling the next
> > > program in the CL.
> > >
> > > Thank you,
> > >
> > > Joe Giusto II
> > > Patuxent Publishing Company
> > >  <mailto:jgiusto@patuxent.com> mailto:JGiusto@patuxent.com
> > > http://www.lifegoeson.com <http://lifegoeson.com>
> > >
> > > +---
> > > | 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
> > > +---
> > +---
> > | 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
> > +---
> >
> 
> +---
> | 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
> +---
> 
+---
| 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
+---


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].