Processing threads
The way that the DRA processes a CCTL thread is different from how it processes an ODBA thread. In each case, the CCTL or z/OS® application program issues a request through the creation of a DRA thread or the allocation of a DRA thread block, respectively.
Processing a CCTL thread
When a CCTL application program needs data from an IMS DB database, a CCTL task must issue a SCHED request for a PSB. To process the SCHED request, the DRA must create a DRA thread. To do this, the DRA chooses an available DRA thread TCB and assigns to it the CCTL thread token (a unique token that CCTL puts in the SCHED PAPL PAPLTTOK) and its own IMS DB task, which schedules the PSB. If the scheduling is successful, the DRA thread connection is considered complete because it now connects a CCTL thread to an IMS DB task using a specific DRA thread TCB.
Subsequent DRA requests from this CCTL thread must use the same CCTL thread token in order to ensure that the request goes to the correct DRA thread. When the application program finishes and the CCTL thread no longer needs the services of the DRA thread, the CCTL issues a TERMTHRD (Terminate Thread) request to remove the CCTL thread token from the DRA thread TCB and terminates the DRA thread. The thread TCB can then become part of a new DRA thread.
Processing an ODBA thread
When a z/OS application program needs data from an IMS database, an ODBA task must issue an APSB call to initialize the ODBA environment. To process the APSB call, the DRA allocates a DRA thread block and assigns to it the ODBA thread and its own IMS DB task, which schedules the PSB. If the scheduling is successful, the DRA thread connection is considered complete because it now connects an ODBA thread to an IMS DB task using a specific DRA thread block.
When the application program finishes and the ODBA thread no longer needs the services of the DRA thread, the ODBA application issues a DPSB call to terminate the DRA thread. The thread block can then become part of a new DRA thread.