- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
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
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.
- Related Articles
- 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 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?
- Steps involved in compilation of a COBOL-DB2 program
- How to precompile a COBOL-DB2 program?
- How to execute a COBOL-DB2 program PROGA of plan PLANA?
- Purpose and usage of SAVEPOINT in COBOL-DB2 program
- How NON-REPEATABLE READ & PHANTOMS impact functioning of a COBOL-DB2 program?
- Impact of database downtime on the COBOL-DB2 program
- How can a COBOL-DB2 program call a STORED PROCEDURE? Give an example.
- 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?
- How LOST UPDATE and DIRTY READ impact the processing of a COBOL-DB2 program?

Advertisements