- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How NON-REPEATABLE READ & PHANTOMS impact functioning of a COBOL-DB2 program?
The NON-REPEATABLE READ conditions occur when the COBOL-DB2 program executes the same query multiple times, but the result of the query is different each time. This generally happens when two COBOL-DB2 programs access the same row of the DB2 table.
The first program reads the row, then the second program reads the same row, updates it and commits the changes. The first program again reads the same row but now the data does not match with the previous fetch.
The PHANTOM condition occurs when the number of rows in the query result does not match when the query is executed multiple times.
For example, if PROG A executes the query with certain WHERE conditions and gets 3 rows in the result. Now PROG B inserts a new row in the same table and the new row falls under the query predicate used by PROG A.
Finally, PROG A executes the same query and gets a total 4 rows in result. The extra 1 row is known as phantom.
- Related Articles
- How LOST UPDATE and DIRTY READ impact the processing of a COBOL-DB2 program?
- Impact of database downtime on the COBOL-DB2 program
- How to precompile a COBOL-DB2 program?
- Purpose and usage of SAVEPOINT in COBOL-DB2 program
- How to execute a COBOL-DB2 program PROGA of plan PLANA?
- Steps involved in compilation of a COBOL-DB2 program
- Implementation of restart logic in a COBOL-DB2 program
- How to store a NULL value in a particular column of a DB2 table using COBOL-DB2 program?
- How can you revert all the DB2 table changes done in a COBOL-DB2 program?
- Implementation of a table level locks in a COBOL-DB2 program during program execution
- How can a COBOL-DB2 program call a STORED PROCEDURE? Give an example.
- Behaviour of a COBOL-DB2 program when number of locks exceed the limit
- Difference between Impact and Non-Impact Printers
- How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?
- How to use SQLCA in a COBOL-DB2 program? What is the purpose of SQLCA?