Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Re: Accessing m...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 10 Topic 3683 of 3784
Post > Topic >>

Re: Accessing mainframe DB2 in Java.

by i.dont.need@[EMAIL PROTECTED] Mar 23, 2008 at 08:22 PM

zalek wrote:
> Hello,
> 
> I am a mainframe Cobol programmer (yes - Cobol programmers are still
> around, mostly in caves) and I am writing a java code to access DB2.
> In a Cobol world after each SQL command we are checking for return
> conditions like success (sqlcode=0), not found (sqlcode = +100),
> duplicates (sqlcode=803) and more.

If you intend to write to the db directly, rather than via ORM, then I'd 
recommend using Spring's JDBC facilities. Their approach to this issue 
is to rethrow much more specific exceptions outlining what went wrong. I 
find this to be marginally better, but the real benefit of Spring here 
is getting rid of all that horrid boiler plate code that one must write 
with straight JDBC. If your intent is to learn, then try a few methods 
both ways and see for yourself.

-- 
Shane
 




 10 Posts in Topic:
Accessing mainframe DB2 in Java.
zalek <zalekbloom@[EMA  2008-03-22 14:12:06 
Re: Accessing mainframe DB2 in Java.
=?ISO-8859-1?Q?Arne_Vajh=  2008-03-22 17:14:40 
Re: Accessing mainframe DB2 in Java.
zalek <zalekbloom@[EMA  2008-03-22 14:28:01 
Re: Accessing mainframe DB2 in Java.
=?ISO-8859-1?Q?Arne_Vajh=  2008-03-22 19:02:25 
Re: Accessing mainframe DB2 in Java.
Mark Space <markspace@  2008-03-22 16:42:58 
Re: Accessing mainframe DB2 in Java.
Mark Space <markspace@  2008-03-22 14:28:25 
Re: Accessing mainframe DB2 in Java.
Mark Space <markspace@  2008-03-22 21:36:42 
Re: Accessing mainframe DB2 in Java.
i.dont.need@[EMAIL PROTEC  2008-03-23 20:22:09 
Re: Accessing mainframe DB2 in Java.
Mickey <mickeyb@[EMAIL  2008-03-25 11:14:51 
Re: Accessing mainframe DB2 in Java.
Alex.From.Ohio.Java@[EMAI  2008-03-25 11:45:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 6:34:42 CDT 2008.