QUEL Reference Guide > QUEL Reference Guide > QUEL and EQUEL Statements > ENDRETRIEVE--Terminate a Retrieve Loop
Was this helpful?
ENDRETRIEVE--Terminate a Retrieve Loop
Valid in: EQUEL
Terminates a retrieve loop.
This statement has the following format:
## endretrieve
The endretrieve statement terminates EQUEL retrieve loops. A retrieve loop is a retrieve statement followed by a block of code delimited by curly braces ({ }). The endretrieve statement is used within the code block to terminate the retrieve loop and transfer control to the first statement following the loop.
If the endretrieve statement is issued inside a forms display loop that is nested within a retrieve loop, the endretrieve statement terminates the display loop as well as the retrieve loop.
Last modified date: 01/30/2023