Providing a primary authorization ID for a CICS region
The primary authorization ID that is passed to DB2 depends whether CICS is running as a started task, a started job, or a job.
About this task
- The user ID taken from the RACF started procedures table, ICHRIN03, if CICS is running as a started task.
- The user parameter of the STDATA segment in a STARTED general resource class profile, if CICS is running as a started job.
- The user ID specified on the USER parameter of the JOB card, if CICS is running as a job.
The user ID that a CICS region might use must be defined to RACF, or your equivalent external security manager, if the external security manager is active. Define the user ID to RACF as a USER profile. It is not sufficient to define it as a RESOURCE profile.
- Define a profile for the DB2 subsystem
with the single address space subsystem (SASS) type of connection,
in the RACF class DSNR. For example, the following RACF command creates
a profile for SASS connections to DB2 subsystem DB2A in class DSNR:
RDEFINE DSNR (DB2A.SASS) OWNER(DB2OWNER) - Permit the user ID for the CICS region to access the DB2 subsystem.
For example, the following RACF command permits a CICS region with
a user ID of CICSHA11 to connect to DB2 subsystem DB2A:
PERMIT DB2A.SASS CLASS(DSNR) ID(CICSHA11) ACCESS(READ)
DB2's connection exit routine takes the primary authorization ID (the user ID) provided by the CICS region, and sets it as the primary ID for the CICS region in DB2. The default DB2 connection exit routine DSN3@ATH, and the sample DB2 connection exit routine DSN3SATH, both behave in this way. It is possible to change the primary ID that DB2 sets, by writing your own connection exit routine. The DB2 for z/OS: Application Programming Guide and Reference for Java has more information about the sample connection exit routine and about writing exit routines. However, you might find it more straightforward to provide secondary authorization IDs for the CICS region, and grant permissions to the CICS region based on these, rather than on the primary authorization ID.