Page 1 of 1

SQLSTATE vs SQLCODE in Online program

PostPosted: Wed Apr 23, 2014 9:07 pm
by kumar009
Why SQLSTATE is used after every SQL query in COBOL CICS program rather than SQLCOCE ? IS there any specific reason ? Special benefit over it ?

Re: SQLSTATE vs SQLCODE in Online program

PostPosted: Thu Apr 24, 2014 3:55 am
by NicC
Cannot say that I have ever seen SQLSTATE used after ANY SQL query whereas the checking of SQLCODE should be mandatory.

Re: SQLSTATE vs SQLCODE in Online program

PostPosted: Thu Apr 24, 2014 10:49 am
by kumar009
At my site, In batch programs every SQL query is followed by EVALUATing SQLCODE, But when it comes to online programs every SQL query follows SQLSTATE checking. Is it a site specific not the general practice ?