Here is the syntax for a FINALLY block:

FINALLY:
  .
  .
  .
END [ FINALLY ].

All ABL blocks, other than a simple DO or DO WHILE block (one without TRANSACTION or an ON phrase), can have a FINALLY block.

There can only be one FINALLY block in any associated block. The FINALLY statement must come after all other executable statements in the associated block and before the END statement. If the associated block contains CATCH statements, the FINALLY block must come after all CATCH blocks. Note that the FINALLY statement can be used in a block with no CATCH blocks.