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



Bill,


If you are using the RPG Cycle to process an Input Primary file, LR will never be available for testing in the Detail Calcs. Jon's example, I'm sure, was predicated upon you setting on LR.


Barbara was simply trying to confirm your original post: There is no free-format equivalent of Last Record total calcs (or any Total Calcs for that matter).


        * Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
        615.995.7024
fax
        615.995.1201
email
        jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Bill wrote:

Barbara Morris wrote:
Bill wrote:
Is there a free format equivalent to the following?

/End-Free
CLR                    Exsr srLRRtn
/Free

If you're using the RPG cycle, then you can code like this.  Simply
coding IF *INLR in your detail calcs won't work if your total calcs
are being run by reaching LR-on in your primary file.

C            EXSR      DETAIL
CLR          EXSR      TOTAL
/free

Unless I'm missing something isn't this the same as my example except the
different subroutine name?

And you have picked up the distinction I was asking about:  LR is turned on
due to EOF on the primary file.  Sort of an opposite of *Inzsr.

I believe I can use Jon's and Michael's simple suggestion if I put the "If
*InLR = *On ;" at the end of the detail specifications since the only
requirement is to write a record to a file at the end of the program
processing.

Bill




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.