SPL routines

Stored Procedure Language (SPL) is part of the database server. Many of the examples in this publication are shown in SPL because it is simple to use and requires no support outside the database server.

SPL provides flow-control extensions to SQL. An SPL routine is a UDR that is written in SPL and SQL. The body of an SPL routine contains SQL statements and flow-control statements for looping and branching. For information about the syntax of SPL statements, see the Informix® Guide to SQL: Syntax. For an explanation of how to use SPL statements, refer to the Informix® Guide to SQL: Tutorial.

The database server parses and optimizes an SPL routine and stores it in the system catalog tables in executable format. If possible, use SPL routines for SQL-intensive tasks.

For more information, see Create an SPL routine.