Statement Block

Use a statement block to specify SPL and SQL operations to take place when an SPL statement that includes this segment is executed.

Syntax

Read syntax diagramSkip visual syntax diagram
Statement Block
Read syntax diagramSkip visual syntax diagramDEFINE Statement1ON EXCEPTION Statement2EXECUTE FUNCTION Statement3EXECUTE PROCEDURE Statement4Subset of SPL Statements5Subset of SQL Statements6;BEGINStatement BlockEND

Usage

SPL and SQL statements can appear in a statement block, a set of zero or more statements that can define the scope of a variable or of the ON EXCEPTION statement. If a statement block is empty, no operation takes place when control of execution within the SPL routine passes to the empty SPL statement block.