Generate the text of the routine
After you create an SPL routine, it is stored in the sysprocbody system catalog table. The sysprocbody system catalog table contains the executable routine, as well as its text.
To retrieve the text of the routine, select the data column from the sysprocbody system catalog table. The datakey column for a text entry has the code T.
The SELECT statement in the following figure
reads the text of the SPL routine read_address.
Figure 1. SELECT
statement to read the text of the SPL routine.
SELECT data FROM informix.sysprocbody
WHERE datakey = 'T' -- find text lines
AND procid =
( SELECT procid
FROM informix.sysprocedures
WHERE informix.sysprocedures.procname =
'read_address' )