Database Management for Db2 for z/OS different Db2 Connection types during one TSO session
search cancel

Database Management for Db2 for z/OS different Db2 Connection types during one TSO session

book

Article ID: 191108

calendar_today

Updated On: 03-12-2025

Products

Database Management for DB2 for z/OS - Administration Suite Database Management for DB2 for z/OS - Performance Suite Database Management for DB2 for z/OS - Recovery Suite Database Management for DB2 for z/OS - SQL Performance Suite Database Management for DB2 for z/OS - Utilities Suite DATABASE MANAGEMENT SOLUTIONS FOR DB2 FOR Z/OS

Issue/Introduction

With parameter CONNECT(AUTO) in SETUPxx this error is seen when executing some DDL using Batch Processor:

PTIDB2-CAF: ADDRESS SPACE CONNECTED WITH DIFFERENT NAME OR TYPE
BPA0010E: CONNECTION TO DB2 SSID ssid HAS FAILED USING PLAN: RBPAPLAN


With CONNECT(AUTO) in hlq.CDBAPARM(SETUPxx):

A split screen is being used in ISPF:
1) In the first screen an IBM Db2 Administration tool is opened
2) In second an ISQL session will execute some DDL with Batch Processsor

In the ISQL session this error is received when BATCH PROCESSOR is executing:

PTIDB2-CAF: ADDRESS SPACE CONNECTED WITH DIFFERENT NAME OR TYPE          
 BPA0010E: CONNECTION TO DB2 SSID ssid HAS FAILED USING PLAN: RBPAPLAN.  

With CONNECT(CAF) in hlq.CDBAPARM(SETUPxx) the same error is not observed.

Cause

As the Db2 Admin Tool is using CAF and Batch Processor is using RRSAF, the problem of simultaneous accesses (CAF and RRSAF) is the reason for the PTIDB2-CAF message.

Resolution

Regarding the split screen situation where two utilities are accessing DB2 the IBM documentation states:

Connecting to Db2 from your application program

Note the "Requirement" box. 

"Different attachment facilities cannot be active concurrently within the same address space. Specifically, the following requirements exist:
An application must not use CAF or RRSAF in an CICS or IMS address space.
An application that runs in an address space that has a CAF connection to Db2 cannot connect to Db2 by using RRSAF.
An application that runs in an address space that has an RRSAF connection to Db2 cannot connect to Db2 by using CAF.
An application cannot invoke the z/OS AXSET macro after executing the CAF CONNECT call and before executing the CAF DISCONNECT call."

So, in this case the IBM DB2 Admin tool is using a CAF connection. The Db2 connection type, hlq.CDBAPARM(SETUPxx) CONNECT(AUTO) is the parameter option that
enables the Database Management Solutions for Db2 for z/OS to switch to RRSAF as required.

 
As the Db2 Admin Tool is using CAF and Batch Processor is using RRSAF, the problem of simultaneous accesses (CAF and RRSAF) is the reason for the PTIDB2-CAF message. 

When the user has CONNECT (AUTO) in SETUPxx and does not have a split screen (no other application running) the ISQL / Batch Processor does not have a problem
with the RRSAF setting being used.

Additional Information

Connections to DB2 for application programs 

RRSAF Authorization in the Database Management Solutions for DB2 for z/OS
"Update the hlq.CDBAPARM(SETUPxx) member to specify AUTO for the Db2 connection type, CONNECT(AUTO). This parameter option enables the Database Management Solutions
for DB2 for z/OS to switch to RRSAF as required."