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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of runstats in db2?

571


what is the sqlcode -501

11272


What is a collection in db2?

576


What is consistency token in db2?

634


Define db2.

662






List down the types of triggers in the db2 database?

583


What is data manager?

601


Following a db2 update statement, what is the quickest way to compute the total number of updated rows?

618


How to connect to db2 database from windows command line?

560


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

620


What is the difference between cursor and select statement?

607


What is runstats db2?

576


What language is db2 written in?

591


What is a bind in db2?

587


Define sqlca.

645