Chapter 7: Databases

MTO provides support for relational databases. This chapter discusses the support provided.

Database Managers Supported

MTO provides built-in support for the same XA-compliant database managers as Enterprise Server without MTO. For more information see the section Resource Managers in the chapter Configuration in your Enterprise Server Configuration and Administration book.

You can add support for other XA-compliant database managers. To do this, you write and compile a switch module for the database. See the database vendor's documentation for advice on how to do this.

You can configure the database managers using either the Edit Server page in Enterprise Server Administration, or the CICS XAT page in ESMAC.

How to...

The support for relational database managers enables CICS applications to issue database DDL and DML statements in the form of embedded Structured Query Language. SQL requests are structured in a similar way to CICS commands. Using them, you can create, modify and query data tables.

Using Other Database Managers

You can access other, non-XA-compliant databases through . The recommended method is to use the exit program DFHUSYNC. A sample exit program is supplied as dfhusync.cbl in the $COBDIR/src/ folder. Follow these steps to customize the sample exit program:

  1. Add code to be invoked at any or all of the following points:

    This code should invoke the appropriate actions from the database manager being used. If you want to enable commit and rollback processing (two-phase commit), include the SQL Communications Area (SQLCA) in the Working-Storage Section of the dfhusync.cbl module.

  2. Run dfhusync.cbl through the appropriate SQL preprocessor.
  3. In Net Express or Server Express, compile dfhusync.cbl to any callable format. Do not use the CICS preprocessor.
  4. Put the compiled module in the $COBDIR/lib directory, replacing the default version supplied with MTO.

Note: A CICS application that updates more than one single-phase resource compromises resource integrity.


Copyright © 2006 Micro Focus (IP) Ltd. All rights reserved.