If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > BEGIN ATOMIC block in SQLj

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-03, 00:04
SShetty SShetty is offline
Registered User
 
Join Date: Nov 2003
Location: India
Posts: 6
BEGIN ATOMIC block in SQLj

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!!

Last edited by SShetty; 12-09-03 at 00:07.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On