Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AS400 and JDBC (and SQL)

 
Robin Richardson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a problem locating a file in AS400 using SQL if I try to use commit() and rollback(). Are these not accepted in AS400, and if not is there a better way to do this?
Thanks
Robin
 
Nick Heudecker
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
commit() and rollback() are accepted on DB2/400. It may be a permissions issue. That's usually what holds me up on the 400.
 
Robin Richardson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It isn't so much that it won't commit and rollback, but when I add these commands then the program gives me an SQL error stating that a token is wrong, or a statement in not correct. Forgot to write down the SQL error number.
If anyone knows where I can vind a listing of SQL error codes (mostly for Oracle, and DB/2 would be helpful) I would greatly appreciate it.
Thanks
Robin Richardson
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you handle commit() by yourself, the file on AS400 must be journalled. Otherwise you get SQL7008 error.
Bruce
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, to view SQL error description on AS400, use command
DSPMSGD. the message file is QSQLMSG.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic