Hi,
I am trying to use a atomic block within a SQLj statment. But I am getting this error when I am running the bldsqlj command :
//atomicStmt is the class name
------------------------------------------------------------------------
D:\SQLJ>bldsqlj atomicStmt user pwd
[ibm][db2][jcc][sqlj]
[ibm][db2][jcc][sqlj] Begin Customization of Profile:
[ibm][db2][jcc][sqlj] Profile name is: atomicStmt_SJProfile0
[ibm][db2][jcc][sqlj] Error: unable to customize profile atomicStmt_SJProfile0
------------------------------------------------------------------------
The code that I am trying to execute is:
#sql {
BEGIN ATOMIC DECLARE numrows INT DEFAULT 0;
UPDATE db2inst2.staff
SET salary = 33333
WHERE ID < 100;
GET DIAGNOSTICS numrows = ROW_COUNT;
UPDATE db2inst2.staff
SET salary = numrows
WHERE ID = 10;
END
};
I am working ob DB2v8.1 on AIX.
Is it that BEGIN ATOMIC cannot be used in the #sql{} SQLj stmt or is there any other error?
Thanks!!