During program debug, noticed that the READ or CHAIN statement was skipped and not executed in my RPG/Free program. The DELETE statement after the READ or CHAIN then hits an error "Update or Delete in file without prior input operation".
Did not hit this error with the same program written in traditional format.
What caused the READ or CHAIN statement to be skipped in the free format?
Software/Hardware used:
ASKED:
June 14, 2005 1:54 PM
UPDATED:
June 18, 2008 11:38 PM
If the logic is exactly the same, you should get the same results. The only thing i can think of is to check very closely (while in debug) what statements are being hit before it jumps over the read/chain opcode.
e.g.:
read record LR
dow *inLR = *OFF
.
.
delete record
read record LR
enddo
should be the same as:
read record ;
dow not %eof() ;
.
.
delete record ;
read record ;
enddo ;
yes? The only other thing i can think of is to look at the fixed format version and verify that the logic really is the same.