4GL Question
Posted in 1993
Ted Reph — — source: Informix-list mailing list archive (1991-1998)
i4gl version 4.00.UH1
ibm risc 6000
database xxxx
main
define lin_id INTEGER
declare upd_curs cursor for
select id
from footable
where foocol = 86
for update
begin work
open upd_curs
fetch upd_curs into lin_id
display "FETCH: ", sqlca.sqlcode
update footable
set a_col = 1
where foocol = 86
display "UPDATE 86: ", sqlca.sqlcode
update footable
set b_col = 2
where current of upd_curs
end main
ASSUMPTIONS: a_col = 0 and b_col = 0 before updates
RESULT: All the sqlca.sqlcode are successes.
a_col = 0
b_col = 2
WHY ??? (granted why would you want to do this??? someone did that's why)