RRSAF (Recoverable Resource Manager Services Attach Facility)

 <  Day Day Up  >  

RRSAF, or the Recoverable Resource Manager Services Attach Facility, is the final "door to DB2." RRSAF is available as of DB2 V5. RRSAF is similar in functionality to CAF but without the implicit connection capabilities. However, RRSAF provides the following additional capabilities and benefits:

  • Applications can reuse DB2 threads for different userids (with SIGNON and AUTH SIGNON ; this requires RACF or a similar system authorization product).

  • Applications (and stored procedures) can coordinate MVS-wide commitment of recoverable resources through OS/390. To qualify for participation in the MVS-wide commit, stored procedures must be executed in an MVS WLM-managed SPAS.

  • DB2 threads can run under different TCBs.

As with CAF, RRSAF controls program connections to DB2. Seven functions are used to control the DB2 connections:

SIGNON

Specifies a userid (and optionally a secondary authid) for the connection

AUTH SIGNON

Specifies a userid (and optionally a secondary authid) for the connection and invokes the signon exit. The program must be APF authorized to execute this function.

IDENTIFY

Specifies that the program is a user of DB2 services.

CREATE THREAD

Establishes a connection between the program's MVS address space and DB2.

TERMINATE THREAD

Deallocates DB2 resources from the program.

TERMINATE IDENTIFY

Deallocates DB2 resources.

TRANSLATE

Provides the program with DB2 error message information, placing it in the SQLCA.


Consider using RRSAF as an alternative to CAF when the performance benefits of thread reuse are deemed necessary.

When you're preparing a program for RRSAF, you must link DSNRLI (the RRSAF interface) to the load module.

graphics/v8_icon.gif

DB2 V8 makes it easier to migrate CAF applications to RRSAF. This is useful when a current CAF application needs two-phase commit (because CAF does not support 2PC and RRSAF does).


Explicit DB2 connections are coded similarly in CAF and RRSAF. For CAF applications, you issue a CONNECT and OPEN . To accomplish the same thing in RRSAF you issue an IDENTIFY and CREATE THREAD . SQL statements can then be issued in your program. To disconnect, CAF uses a CLOSE and DISCONNECT , whereas RRSAF uses a TERMINATE THREAD and TERMINATE IDENTIFY .

But, CAF applications also can connect implicitly to a DB2 subsystem just by issuing SQL statements or IFI calls (without first issuing CONNECT and OPEN ). For DB2 V7 and prior releases this was not possible with RRSAF, but DB2 V8 allows implicit connections to DB2 using RRSAF by just issuing SQL statements or IFI calls.

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net