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



The only time I ever used lookahead fields was for an RPG CPP that I wrote in 1984 on a System/38 for a command which I named RMVELSE.

My RMVELSE command was used to delete redundant ELSE operations from RPG source members.

The RPG program used a lookahead field each time it found a statement containing an ELSE operation code to look at the operation code in the next RPG source statement to see if it was an END – If so, it deleted the source statement containing the ELSE operation.

One of the programmers who preceded me there thought that you needed an ELSE for each END, so in his programs you would find something like:

C A IFEQ B
C C IFEQ D
C E IFEQ F
C G IFEQ H
C I IFEQ J
* a bunch of code here...
C ELSE
C END
C ELSE
C END
C ELSE
C END
C ELSE
C END
C ELSE
C END

After running my command on the source member:

C A IFEQ B
C C IFEQ D
C E IFEQ F
C G IFEQ H
C I IFEQ J
* a bunch of code here...
C END
C END
C END
C END
C END

- sjl

"Jerry C. Adams" wrote in message news:mailman.11270.1358962141.10847.rpg400-l@xxxxxxxxxxxx...

Look Ahead? I *think* that I *may* have done those on a /36, which I
haven't programmed since '93. For sure on a S/3 on an MFCU1 card deck; it
looked like it was stuttering. Field level testing? Probably that same S/3
program.

Jerry C. Adams
IBM i Programmer/Analyst
I take pride in my personal appearance. My standards just happen to be
exceptionally low.

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.