Opening a Select Cursor

When you open either a Select cursor or an update cursor that is created with the SELECT...; FOR UPDATE syntax, the SELECT statement is passed to the database server with any values that are specified in the USING clause. The database server processes the query to the point of locating or constructing the first row of the active set. The following example illustrates a simple OPEN statement in :
EXEC SQL declare s_curs cursor for select * from orders;
EXEC SQL open s_curs;

An SPL routine cannot reference an update cursor in the OPEN statement.