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



It would be important that the program be allowed more than one cycle. In other words, not include a master dow loop to process the records followed by setting LR on.

On 1/23/2013 5:16 PM, John McKay wrote:
The Ln indicators aka total time indicators in the RPG cycle allow you
to generate breaks / subtotals at the end of groups and subgroups of
records.

The test in the example, if rewritten to test for *inL1...9, if in the
normal section of the code, will only test for the start of a group or
subgroup. *inl0 always returns true.

Regards,
Joihn McKay mba
On 23/01/2013 23:06, Buck Calabro wrote:
On 1/23/2013 4:18 PM, Michael Schutte wrote:

I'm not all that familiar with cycle pgm. But just a little... but isn't it
just an indicator that you can check on an if statement? \


/free
main code blah blah blah
if *inL0;
ExSr Break1;
EndIf;
Good question!

Cycle overview:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fbooks_web%2Fc092508655.htm

Cycle in depth:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fbooks_web%2Fc092508656.htm

Calculation specifications, control level indicator (positions 7 and 8):
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fbooks_web%2Fc0925086431.htm

The description of /free:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fbooks_web%2Fc0925086446.htm
says this about total time calculations: 'To indicate the start of
total calculations, end the free-form group and code a fixed-form
calculation specification with a control level specified in positions
7-8. The total calculations may be specified using free-form calculation
syntax. Since the free-form calculation specification does not include a
control-level entry, calculations to be performed on specific level
breaks should be conditioned using the statement "IF *INLx;".'

The compiler must be very clever to recognise that these are total time
calculations:

/end-free
cl1
c/free
if *inl1;
// do my L1 code here
endif;

I myself don't care for this style, and so I use
/end-free
cl1 exsr l1totcalc
c/free

There is no shame at never being exposed to the full brunt of the RPG cycle.
--buck




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.