- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Implementation of a table level locks in a COBOL-DB2 program during program execution
The COBOL-DB2 program can place the lock into a DB2 table in two ways.
When the SQL statement using that table is executed within the program.
When the program is loaded in the main memory and it is ready to be executed. It acquires a lock on all the DB2 tables which are used in the SQL statements within the program.
To acquire the lock on all DB2 tables once the program is loaded in the main memory or allocated to a thread, we have to BIND the plan using appropriate options and parameters. Below is a JCL step which can be used.
//BIND EXEC PGM=IKJEFT01 //STEPLIB DD DSN=DIS.TEST.LOADLIB,DISP=SHR //SYSOUT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(TB3) BIND PLAN(PLANA) - PKLIST(PACKA) - ACQUIRE(ALLOCATE) /*
The BIND option ACQUIRE will be used for this purpose along with the ALLOCATE parameter.
- Implementation of a table level locks in a COBOL-DB2 program during SQL execution
- Implementation of restart logic in a COBOL-DB2 program
- Behaviour of a COBOL-DB2 program when number of locks exceed the limit
- How to precompile a COBOL-DB2 program?
- Steps involved in compilation of 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?
- How to execute a COBOL-DB2 program PROGA of plan PLANA?
- Purpose and usage of SAVEPOINT in COBOL-DB2 program
- Impact of database downtime on the COBOL-DB2 program
- How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?
- How NON-REPEATABLE READ & PHANTOMS impact functioning of a COBOL-DB2 program?
- How can a COBOL-DB2 program call a STORED PROCEDURE? Give an example.
- What is a use of DSNTIAR? How will you implement it in a COBOL-DB2 program?
- How LOST UPDATE and DIRTY READ impact the processing of a COBOL-DB2 program?