Hi,
Assuming I am working on a COBOL DB2 program. A batch program. I execute a SQL query in the program which causes a SQLCODE -811. Now which row will be fetched in DCLGEN or host variable as the select statement had fetched more than one row and with -811 SQL code? Obviously there are duplicates but which duplicate is there?
Will the "fetch first row only" fetches the same row, as the row fetched when we handle -811 SQLCODE?
A question about SQLCODE -811 in DB2.
Re: A question about SQLCODE -811 in DB2.
Do you know if it fetches any data at all? If you don't then I suggest the following:
a) read the manual
b) DISPLAY the variable that is supposed to be populated by the query whilst doing your error handling.
a) read the manual
b) DISPLAY the variable that is supposed to be populated by the query whilst doing your error handling.
Regards
Nic
Nic
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute