Managing allied Db2 threads

Db2 uses allied threads to process local requests and connections from allied subsystems, such as TSO, batch, IMS, CICS®, CAF, or RRSAF. The transaction flow can vary in different environments and when dynamic SQL statements are executed.

TSO and call attachment facility

You can use the TSO attachment facility and call attachment facility (CAF) to request that SQL statements be executed in TSO foreground and batch. The processes differ from CICS or IMS transactions in that:

  • No sign-on is required. The user is identified when the TSO address space is connected.
  • Commit requires only a single-phase and only one I/O operation to each log. Single phase commit records are IFCID 0088 and 0089.
  • Threads cannot be reused because the thread is allocated to the user address space.

Resource Recovery Services attachment facility (RRSAF)

With RRSAF, you have sign-on capabilities, the ability to reuse threads, and the ability to coordinate commit processing across different resource managers.

SQL under QMF

QMF uses CAF to create a thread when a request for work, such as a SELECT statement, is issued. A thread is maintained until the end of the session only if the requester and the server reside in different Db2 subsystems. If the requester and the server are both in the local Db2 subsystem, the thread is not maintained.