gtpa3m09 | Application Requester User's Guide |
The TPF Application Requester (TPFAR) feature supports IBM's Distributed Relational Database Architecture (DRDA) strategy for database distribution using the remote unit of work method of distributed access. DRDA is a relational database connection architecture, consisting of protocols for communications between an application and a remote database, and for communications between databases. Distributed access involves working with data that is located on remote systems. A relational database is a database in which the data is organized and accessed according to relations. Structured Query Language (SQL) is a programming language used to define relational data, access relational data, and control access to relational data resources.
The TPFAR feature permits you to share data between any DRDA- compliant database servers, such as a DATABASE 2 (DB2) relational database and a TPF application using the SQL interface. The component of DB2 that allows the TPFAR connection is known as an application server (AS). For more information about the concept of an application server, see Access to Remote Data or the Distributed Relational Database Architecture Reference. An LU 6.2 conversation or a TCP/IP connection is used to connect a DB2 subsystem with the TPFAR feature. By using the TPFAR feature, a TPF application can directly access and update the information residing on the remote DB2 subsystem.
The remote unit of work is a method of accessing distributed relational data in which users or applications can, within a single unit of work, read and update one system using multiple Structured Query Language (SQL) statements. For a complete list of SQL commands that TPFAR supports, see SQL Commands Supported by TPFAR. To better understand how TPFAR fits the concept of remote data access, DRDA needs to be explained.
There are two parts of accessing remote data defined in DRDA:
Figure 1 shows two non-TPF environments, both with a full DRDA implementation.
Figure 1. Overview of Remote Data
Operating Environment 1 is running with an SQL application (APPL). When a remote SQL request is made, the Operating Environment 1 application requester (AR) of the database management system (DBMS) takes control. The DBMS is a software system that has a catalog describing the data it manages. The DBMS controls access to the data stored within it. The AR then uses the Advanced Peer-to-Peer Communications (APPC) session to route the request to the application server (AS) of the remote database management system (DBMS) of Operating Environment 2 where the data resides.
When the Operating Environment 2 AS has collected the requested information, this information is passed back through APPC to the AR of Operating Environment 1 running the application. The AR then returns the data back to the application program on Operating Environment 1.
Operating Environment 2 can also have local applications accessing the same database. Because Operating Environment 1 and 2 both have implemented the AR and AS, the application in Operating Environment 2 can also access the data residing on Operating Environment 1.
Figure 2. Moving TPF Data to a DB2 Database without TPFAR
Figure 2 shows one method of moving TPF data to a DB2 database without TPFAR. A TPF application program takes the data from TPF and, using TPF/APPC, sends the data to the Customer Information Control System (CICS) subsystem on MVS. An MVS CICS application receives the data from the TPF application and issues the necessary SQL commands to the DB2 subsystem to do the requested work.
Figure 3. Moving TPF Data to and from a DB2 Database Using TPFAR and LU 6.2
Figure 4. Moving TPF Data to and from a DB2 Database Using TPFAR and TCP/IP
TPFAR implements the application requester (AR) part of the DRDA. Thus, with TPFAR, a TPF application can directly access and update data residing on the remote DB2 subsystem.
Figure 3 shows how TPFAR moves data from TPF to a DB2 database using LU 6.2. Figure 4 shows how TPFAR moves data from TPF to a DB2 database using TCP/IP. The TPF application program now includes the SQL commands that previously were in the CICS application program. When the TPF application makes an SQL request, TPFAR forwards the request to the application server (AS) on DB2. DB2 completes the requested work and returns the results to TPFAR. TPFAR then returns the results of the request back to the application.
TPFAR can also be used to move DB2 data to TPF.