This was related to -811 sqlcode, In a COBOL DB2 program
which accesses employee table and selects rows for employee
'A', it should perform a paragraph s001-x if employee 'A'
is present. In this case it gets -811 sqlcode, but still it
process the paragraph s001-x. What could be wrong in my
code.

Answer Posted / karamveer

-811 will come because you have the multiple record fetched by your query. But still your para is stored because first record from your query resultset is fetched and processed. -811 is error but it will not abend your program and it runs fine. You need to build query which result unique record.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention the location where the output received from explain statement is stored.

637


What is a cursor in programming?

605


What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?

734


What is cursor stability in db2?

819


My sql statement select avg(salary) from emp yields inaccurate results. Why?

652






Highlight all the advantages that are attached to a package.

636


What does a deadlock mean in DB2?

660


What is clone table?

597


Define db2 and its databases?

630


have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.

1253


What does runstats do in db2?

613


What is rct?

760


How to find the number of rows in a db2 table?

653


What is a db2 collection?

612


What is the use of db2?

597