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



This has actually been done to a few of our programs and caused issues.

// This runs when something has changed.
IF *INL5;
EXSR SOMENAME ;
Endif;

// this runs when something is About to change, but hasn't changed yet.
/end-free
CL5 EXSR SOMENAME
/free

The they are not logically equivalent.

Personally, I rewrite the logic and use data structures to save the last
values.

READ FILENAME InputDS;

IF %eof(filename) or SavedInput.field <> InputDS.Field;
-- Process data in SavedInput;
EVAL-CORR SavedInput = InputDS;
ENDIF;

If %eof(filename);
Leave;
Endif;

I also dislike coding Primary files and DOW loops, so to each their own.

If we really need to have the level breaks preserved in FREE maybe we
should ask IBM for a bif that acts like "CL5", I.E. (Returns true when
something is about to change).

Chris Hiebert
Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the
author and do not necessarily represent those of the company.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: Thursday, January 24, 2013 5:04 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

You're basically correct, so far as you go. You have to have a primary
file for the cycle processing to mean much, if anything.

In /free there are no columns on the left for the indicators, so it's
not obvious what you would do. Maybe one could replace the

/end-free
CL0 do-something, like call a procedure
/free

with

if *inl0;
do-something, like call a procedure;
endif;

I've never even thought of doing something like this - anyone willing to
try? I'm driving to Chicago for COMMON tomorrow, no time.

Hey, I'm just making wild guesses here after a much-too splendiferous
day

Vern

On 1/24/2013 5:42 PM, Booth Martin wrote:
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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.