Use NEXT, STOP, and QUIT to change block behavior
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
There's another one-word statement that works much like LEAVE and
that is NEXT. As you might expect, this statement
skips any remaining statements in the block and proceeds to the
next iteration of the block. You can qualify it with a block name the
same way you do with LEAVE.
There are two more such statements that have increasingly more
drastic consequences: STOP and QUIT.
STOP terminates the current procedure, backs
out any active transactions, and returns to the OpenEdge session's startup procedure or to the
Editor. You can intercept a STOP action by including the
ON STOP phrase on a block header, which defines an action
to take other than the default when the STOP condition
occurs.
QUIT exits from OpenEdge altogether in a
run-time environment and returns to the operating system. If you are running in a development
environment, it has a similar effect to STOP and returns to
the Editor or to the Desktop. There is also an ON QUIT phrase
to intercept the QUIT condition in a block header and define
an action to take other than quitting the session.