When manipulating data files in code, you can check after each operation for errors.
Here’s an example:

1
2
3
4
5
6
7
8
9
10
11
clear(peo:Record)
peo:EnteredDate = _:FirstDayOfYear
set(peo:keyEntered,peo:keyEntered)
loop
next(People)
if ((errorcode() = 33) or (peo:EnteredDate > today())
break
elsif errorcode()
_AddError(_:ProcedureName,’routinename’,subject,body)
.
.

So what’s going on?
When you’re running an error check, there are certain errors that should be handled with special care, contextually based on the preceeding command.
After a next() I know […]