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



Vern,
From what I recall, L0 is always on, and the only way to indicate "total"
time processing was by using a CLx statement. I like to use L0 since with
that always on, I can then code statements like If *InL1, or If *InL2
after or along with it to indicate that I am in total processing and only
have to test the indicator once.
Back when we only had fixed form, since you had to code all total calcs as
CLx, if you used the L1 - L9 indicator, it was tested on each line, whereas
the CL0 was only tested once.
Still, we need the CLx to tell the compiler that we are now in the "total
time" processing part of the cycle.


On Fri, Jan 25, 2013 at 10:11 AM, Vernon Hamberg
<vhamberg@xxxxxxxxxxxxxxx>wrote:

Jeff

Sounds good. I'm still curious about using something like

if *INL0;

in the /free area. Yes, it'd be in "detail" processing, but if that were
done at the top, would it not be basically the same as the CL0 approach?

I mean, the cycle does check for L0 before it goes back to detail
processing, right? Same with the other levels?

When I get some time, maybe next week, I may try this.

Regards and off to Chicago!
Vern

On 1/25/2013 8:13 AM, Jeff Young wrote:
The program is question is a simple report, reading a file and by
specifying level indicators, do some logic when a control break occurs.
Yes, I can and have written my own control break logic when needed, but
why
reinvent the wheel when it is already mounted on the car?
To do special logic when a "total" control break occurs, the cycle gives
me
"total time" logic that I can use.
I have used the convention of ending free-form, specifying a CL0 If
*InL1 statement in fixed form, then returning back to free-form and
coding
the rest of my logic.
The CL0 tells the compiler that I am now in "total" time, and will only
execute the code when the appropriate condition is met.

Thanks to everyone that responded.


On Thu, Jan 24, 2013 at 10:05 PM, Brian May <bmay@xxxxxxxxxxxxxxxxx>
wrote:

On the first point, not always. You can put your mainline logic in a
subprocedure and use the MAIN keyword on the H spec to specify the
subprocedure to be used as the mainline. In this scenario, the RPG
cycle
is not invoked, thus eliminating the overhead of the cycle (which I
don't
use anyway).

Brian May
IBM i Modernization Specialist
Profound Logic Software
http://www.profoundlogic.com
937-439-7925 Phone
877-224-7768 Toll Free






-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:
rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Booth Martin
Sent: Thursday, January 24, 2013 5:43 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Indicating Total Time in Free Form when using RPG Cycle -
Solved

FREE still uses the cycle, so far as I know. It is us programmers who
have added in the redundant code of the DOW not %EOF loop. Take out
that
loop, and so far as I know, you are back to the original RPG cycle.

Setting on the L1-L9 indicators is usually done in the I specs, I
believe?
In which case it is probably easier to finish converting the old code
and
do your L1 calculations within the Calc specs and use named indicators
and/or conditioned sub routines in place of L1-L9.

If the issue is L0 then my understanding is that L0 is always on and
therefore not relevant to solving any practical programing problems.



On 1/24/2013 5:31 PM, Vernon Hamberg wrote:
Well, Jeff, you COULD just write your own level-break processing and
keep it all in /free - I'm almost kidding, it's not the hardest thing
in
the world to do.

On 1/24/2013 2:12 PM, Jeff Young wrote:
Thank to everyone that responded.
It appears that (as I presumed) in order to implement this, I indeed
must
break out of /free mode to set a CLx spec to indicate the start of RPG
Cycle Total Time processing. After this statement, I can resume /free
mode
for all other logic and it will be part of the total cycle.

Thanks again.

--
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





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.