× 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: Subject: Retrieving Relative Record Number
  • From: "Scott Klement" <infosys@xxxxxxxxxxxx>
  • Date: 08 Nov 1999 11:23:44 -0600

"BARB TURNER" <TURNERB@LIONEL.COM> wrote:
>
> Does anyone know of a way to get the relative record number of a
> physical file, to be stored in a hidden field within a subfile as th
> subfile is filled?

You can get the RRN of a PF using an INFDS.  Do a search in your
softcopy library (or on the web) in the RPG Reference manual for
"INFDS" for details.

If you use this approach, make sure that your RPG program is not
performing "blocking" on the file.  Blocking will cause the RRN's
in the INFDS to be updated only once per block read, instead of
on every record.

You may also want to use caution that another job can't update this
file at the same time.   A simple ALCOBJ with a MONMSG in a CL program
should accomplish this nicely.   I'm assuming that you don't want
other people to be changing the file at the same time...  If thats
not the case, ignore this remark :)

Hope that helps...

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