This illustration shows the following syntax on a horizontal line:
EXEC SQL CLOSE
cursor
:cursor_variable (on a loop