SQL DECLARE syntax in ESQL/C and ESQL/COBOL has been extended to include the RELEASE_LOCKS_ON_CLOSE keyword.
EXEC SQL DECLARE cursor_name
[SEMI_SENSITIVE | INSENSITIVE]
[SCROLL | NOSCROLL]
[RELEASE_LOCKS_ON_CLOSE]
CURSOR FOR “select stmt”
[for {read only | update [ of column_name_list]}]
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.
CS_CUR_RELLOCKS_ONCLOSE | CS_READ_ONLY
CS_CUR_RELLOCKS_ONCLOSE | CS_FOR_UPDATE
ESQL/C sample code is available in example8.cp; ESQL/COBOL sample code is available in example7.pco.