Introduction to SPL routines
An SPL routine is a generic term that includes SPL procedures and SPL functions. An SPL procedure is a routine written in SPL and SQL that does not return a value. An SPL function is a routine written in SPL and SQL that returns a single value, a value with a complex data type, or multiple values. Generally, a routine written in SPL that returns a value is an SPL function.
You use SQL and SPL statements to write an SPL routine. SPL statements can be used only inside the CREATE PROCEDURE, CREATE PROCEDURE FROM, CREATE FUNCTION, and CREATE FUNCTION FROM statements. All these statements are available with SQL APIs such as . The CREATE PROCEDURE and CREATE FUNCTION statements are available with DB-Access.
To list all SPL routines in a database, run this command, which
creates and displays the schema for a database:
dbschema -d database_name -f all