Controlling users' access to plans
A number of checks take place before a user can access plans in DB2. These checks start in the CICS address space before the request is passed to DB2 for further checks.
About this task
For DB2 commands, the first security check for users'
access to plans takes place in the CICS address space, when CICS verifies
that the user is permitted to access the transaction that will execute
the plan. The second security check takes place in the DB2 address
space, when DB2 verifies that the authorization ID provided by the
transaction, is authorized to execute the plan. Figure 1 illustrates this process.
Figure 1. Security mechanisms for executing a plan

To authorize a user to execute a plan, use a GRANT command to grant DB2 command privileges to the authorization ID that the transaction has passed from CICS. The DB2 for z/OS: Application Programming Guide and Reference for Java has full information on how to grant, and revoke, DB2 permissions for authorization IDs.