Hi,

I have following SQL Proc in Oracle

PROCEDURE p_checkvalidate
/*
This Procedure Updates the value for
Column is deleted
Implmentation done with help of DBMS_JOB
*/

as
PRAGMA autonomous_transaction;
CURSOR cur_users is
select *
from users
where sysdate > VALIDTILLDATE ;
cur_users_rec cur_users%rowtype ;
BEGIN
For cur_users_rec in cur_users

LOOP

If cur_users_rec.VALIDTILLDATE is null then

null ;

Else

Update users set IsDeleted ='T' where userid = cur_users_rec.userid ;

End if ;

COMMIT;
END LOOP ;
END;

My question is

1.how to use Pragma autonomous_transaction in DB2
2.%rowtype sunstitute in Db2