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.

Answers were Sorted based on User's Feedback



This was related to -811 sqlcode, In a COBOL DB2 program which accesses employee table and selects..

Answer / srivalli janapati

Your code must not be using the CURSOR concept and NOT
handling the abend properly.When atleast CURSOR is not
being used in the code,there should be alteranative code to
handle when query resulted in retrieving multiple rows.

-811: is basically the SELECT query resulted in retrieving
more than a Row

Meaning,the resultant query must be retrieving more than a
row,and tried to push all the resualtant rows at a time for
the processing.COBOL-DB2 program can't handle this
situation as it expects a row at a time and then ABENDS.

Is This Answer Correct ?    16 Yes 0 No

This was related to -811 sqlcode, In a COBOL DB2 program which accesses employee table and selects..

Answer / 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

This was related to -811 sqlcode, In a COBOL DB2 program which accesses employee table and selects..

Answer / sangeethas1985

anybody who has an idea about this, please post answer.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More DB2 Interview Questions

What are leaf pages?

3 Answers  


Give the name of some fields form sqlca.

0 Answers  


A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cobol-db2 program. How should I declare my local input file variable or any suggestion?

7 Answers   IBM,


What is the purpose of coding FETCH in a SQL SELECT query? Explain with an example in Detail?

4 Answers  


Which are the db2 tools to protect integrity of the database?

0 Answers   IBM,






In which column of which DB2 catalog would you find the length of the rows for all tables?

2 Answers  


what is a collection?

2 Answers  


Can any one tell me about Restart logic in DB2.

2 Answers  


What is the difference between dbm cfg and db cfg file in db2 ?

0 Answers   MCN Solutions,


What is the purpose of the QUIESE Utility?

1 Answers  


What is bufferpool in db2?

0 Answers  


can I alter a table (e.g. adding a column) when other user is selecting some columns or updating some columns from the same table?

1 Answers  


Categories