Declaring cursors that release locks at cursor close

The syntax for declaring cursors that release locks when the cursor closes is:

exec sql declare  cursor_name  [cursor sensitivity] [cursor scrollability] [release_locks_on_close] 
cursor for  select_statement
[for {read only | update [ of column_name_list]}] ;

where:

You cannot use release_locks_on_close with an update clause except in this form:

exec sql declare cursor c1 release_locks_on_close
   cursor for select * from T for update of col_a

In this case, release_locks_on_close is ignored.

Notecobpre cannot generate these ct_cursor() options:

ESQL/COBOL sample code is available in example7.pco.