Rule Definition
Locking tables cause issues with concurrency, even if it is necessary it should be done rarely.
Remediation
Check the code and if so, remove LOCK TABKE
statement.
Violation Code Sample
T2H229 is locked :
...............................................
005230* TABLE T2H229
005240 EXEC SQL
005250 LOCK TABLE T2H229 IN SHARE MODE
005260 END-EXEC.
...............................................
Fixed Code Sample
Put the SQL code for Cobol in comment :
...............................................
005230* TABLE T2H229
005240* EXEC SQL
005250* LOCK TABLE T2H229 IN SHARE MODE
005260* END-EXEC.
...............................................
Reference
https://www.techagilist.com/mainframe/db2-locking-and-concurrency/
https://www1.columbia.edu/sec/acis/db2/db2d0/db2d082.htm
Related Technologies
Technical Criterion
Efficiency - SQL and Data Handling Performance
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.