- 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
How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?
SYSIBM.SYSTABAUTH is a DB2 system table which records the privileges that users/program hold on tables and views. We can use this table to find out the list of programs accessing a particular table and what action the program is performing on the table like SELECT, UPDATE, INSERT or DELETE. The below SQL query can be fired on SYSTABAUTH in order to get list of programs.
SELECT GRANTEE, SELECTAUTH, UPDATEAUTH, INSERTAUTH, DELETEAUTH FROM SYSIBM.SYSABAUTH WHERE GRANTEETYPE = ‘P’ AND TNAME = ‘TAB1’
The column SELECTAUTH, UPDATEAUTH, INSERTAUTH and DELETEAUTH represents SELECT, UPDATE, INSERT and DELETE authority respectively. In the WHERE clause we will add a GRANTEETYPE predicate as ‘P’ to make sure only program names are returned (and not the users). We can give the table name predicate for the TNAME column.
- Related Articles
- How to delete a DB2 table TAB1?
- How to find all the foreign keys of a DB2 table TAB1?
- How can you revert all the DB2 table changes done in a COBOL-DB2 program?
- How to find out all the indexes for a DB2 table TAB1?
- How to find the primary key of a DB2 table TAB1?
- How to store a NULL value in a particular column of a DB2 table using COBOL-DB2 program?
- How to add a row compression to a DB2 table TAB1?
- How to image copy the entire DB2 table TAB1 into a dataset?
- How to create an ALIAS TAB2 for DB2 table TAB1?
- How to do a full & incremental MERGECOPY for a DB2 table TAB1?
- How to precompile a COBOL-DB2 program?
- How to add a new column Address in the above DB2 table TAB1?
- Write a DB2 query to find out all the duplicate INVOICE_ID in ORDERS DB2 table?
- How to execute a COBOL-DB2 program PROGA of plan PLANA?
- How to verify NULL value in DB2 column data using COBOL paragraph?

Advertisements