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.