LOOP
Syntax
The LOOP statement creates an infinite loop. The statements contained within it are executed repeatedly until an EXIT or RETURN statement within the loop is executed.LOOP
statements
END LOOP;
statements
Is a series of one or more PL/MX statements.
Example
A LOOP statement that exits when a condition is met:
LOOP
--- Do some work here.
IF finished THEN -- Terminate the loop.
EXIT;
END IF;
END LOOP;