Re: UNLOAD statement in stored procedure?
Posted in 1998
UNLOAD is on of the forbidden statements within a stored procedure
(INFORMIX calls them restricted) :
SQL Statements 1-141
CREATE PROCEDURE
The statement block can be empty, which results in a procedure that does
nothing. Also, you cannot close the current database or select a new
database
within a procedure. And you cannot drop the current procedure within a
procedure. You can, however, drop another procedure.
Subset of SQL Statements Allowed in the Statement Block
You can use any SQL statement in the statement block, except those listed
in
Figure 1-1.
Figure 1-1
SQL Statements That Cannot Be Used in a Stored Procedure
Restrictions on SELECT Statement
You can use a SELECT statement in only two cases:
n You can use the INTO TEMP clause to put the results of the SELECT
statement into a temporary table.
n You can use the SELECT...INTO form of the SELECT statement to put
the resulting values into procedure variables.
CHECK TABLE FREE
CLOSE GET DESCRIPTOR
CLOSE DATABASE INFO
CONNECT LOAD
CREATE DATABASE OPEN
CREATE PROCEDURE OUTPUT
CREATE PROCEDURE FROM PREPAREDATABASE PUT
DECLARE REPAIR
DESCRIBE ROLLFORWARD DATABASE
EXECUTE SET DESCRIPTOR
EXECUTE IMMEDIATE START DATABASE
FETCH UNLOAD
FLUSH WHENEVER