Using ADBTEPA

Db2 Admin Tool generates JCL for ADBTEPA when Db2 Admin Tool authorization switching is enabled.

Prerequisite: ADBTEPA is used only if the auth-switching function is enabled.

The JCL can vary slightly. A user can request an authorization switch by specifying a user ID in the authorization switch ID field on the Alter Parameters panel. Specifying <NONE> indicates that no Db2 Admin Tool authorization switching is requested.

The following figure illustrates an example in which Db2 Admin Tool authorization switching has not been requested, but has been enabled on the subsystem.

Figure 1. Db2 Admin Tool authorization switching example – enabled on subsystem
//CREAT80  EXEC PGM=ADBTEPA,DYNAMNBR=100,            
//  PARM='/SSID(DSN7),WORKLIST(GO)'                  
//STEPLIB  DD DISP=SHR,                              
//            DSN=DMTOOL.SADBLINK                    
//         DD DISP=SHR,DSN=DSN.DSN7.SDSNEXIT         
//         DD DISP=SHR,DSN=DSN.DSN7.SDSNLOAD         
//SYSTSPRT DD SYSOUT=*                               
//ADBPRINT DD SYSOUT=*                               
//SYSPRINT DD SYSOUT=*                               
//ADBOPT    DD *                                     
PLAN=ADBTEPA                                         
//*AUTH_SWITCH_USERID=                               
//SYSIN    DD DISP=SHR,DSN=ROYC.GO.DDL.CONVMERG      
//*     

ADBTEPA, unlike ADBTEP2, is executed directly and not from within DSN under IKJEFT01. Consequently, the SSID PARM is required to identify the Db2 subsystem on which to run. Similarly, the plan that ADBTEPA uses must also be supplied using the ADBOPT DDNAME. ADBTEPA uses the RRSAF attachment to access Db2.

The following figure illustrates the case where an authorization switch ID has been requested to ADBAUTHS.

Figure 2. Db2 Admin Tool authorization switching example – authorization switch requested
//CREAT80  EXEC PGM=ADBTEPA,DYNAMNBR=100,             
//  PARM='/SSID(DSN7),WORKLIST(GO)'                   
//STEPLIB  DD DISP=SHR,                               
//            DSN=DMTOOL.SADBLINK                     
//         DD DISP=SHR,DSN=DSN.DSN7.SDSNEXIT          
//         DD DISP=SHR,DSN=DSN.DSN7.SDSNLOAD          
//SYSTSPRT DD SYSOUT=*                                
//ADBPRINT DD SYSOUT=*                                
//SYSPRINT DD SYSOUT=*                                
//ADBOPT    DD *                                      
PLAN=ADBTEPA                                          
AUTH_SWITCH_USERID=ADBAUTHS                           
//SYSIN    DD DISP=SHR,DSN=ROYC.GO.DDL.CONVMERG    

In this example, the ID requested was specified using the ADBOPT DDNAME.

ADBTEPA requires that only APF-authorized libraries appear in the STEPLIB, unless ADBTEPA is placed in the link list.

When Db2 Admin Tool authorization switching is enabled, the batch statement list includes system-generated comments near the start of input and after some SQL statements. Do not remove or alter these comments.