The Natural-Documentation of ON ERROR says:
and the Documentation of RETRY says:
That means: If a NAT3145 happens in a module with no ON ERROR-Block, Natural traces back all structure-levels. And if an ON-ERROR-Block is found in one of the calling programs, this one is taken for error handling. But there, I can’t do a RETRY, otherwise a NAT1310 occurs.
So my question is: How can I avoid this situation from the ON-ERROR’s point of view? Is it possible to code the following way:
ON ERROR
IF *ERROR-NR = 3145
IF this-block-is-found-by-back-tracing /* <-- what to code here?
WRITE 'Record is in hold! Try later!'
ESCAPE ROUTINE /* or whatever
ELSE
INPUT 'Hit ENTR to retry'
RETRY
END-IF
END-IF
END-ERROR
Maybe there’s something with IF *PROGRAM = ‘…’ or IF *LEVEL = … But I got no idea how to solve this.
I know, that it’s possible to give every module an ON-ERROR-Block to avoid a NAT1310. But that would be a real time-consuming job for me (we got > 10000 Modules).
Regards,
Matthias