IMS IMS programs access DB2 using the IMS attach facility. It is also possible, but not recommended, to use the CAF. CapabilitiesIMS provides a high-performance execution environment for application programs. An IMS region can connect to one or more DB2 subsystems. You can enter DB2 commands through the /SSR command of IMS. RestrictionsIMS allows you to define as many external subsystem connections as are required. More than one connection can be defined for different DB2 subsystems. All DB2 connections must be within the same MVS system. RequirementsThe DB2 identification must be defined to the control region, the DL/I batch region, and optionally to each dependent region accessing that DB2 system. To make this identification, you must create a subsystem member (SSM) in the IMS.PROCLIB library, and identify the SSM to the applicable IMS regions. One SSM can be shared by all of the IMS regions , or a specific member can be defined for each region. The fields in this record are as follows :
ExecutionPrograms using the IMS attachment facility run under the control of IMS or as DL/I batch applications. Units of WorkLike CICS, IMS manages synchronization points and coordinates committing or backing out the UOW with DB2. The SQL COMMIT and ROLLBACK statements are not allowed in IMS programs. Instead, the appropriate IMS facilities should be used to issue checkpoints, commit work, or roll back work. DB2 automatically backs out changes when an application program abends. DL/I changes may need to be backed out using the DL/I batch backout utility. Program CharacteristicsThere are some specific characteristics for programs running under the IMS attachment facility. InitializationPrograms using the IMS attachment require no special initialization processing. Even though a region can communicate with two or more DB2 subsystems, an IMS application can access only the DB2 subsystem referred to in the language interface that is link-edited. You can alter the SSM to route application requests to a different DB2 subsystem. Programs do not need to code CONNECT statements, since the DB2 subsystem specification is controlled by the SSM. They can issue CONNECT statements to connect to remote databases defined in the local communications database. SQL ProcessingPrograms use embedded SQL statements. The DB2 precompiler translates the statements into the appropriate language calls to the high-level interface module during compilation. Error CheckingAs with the TSO and CICS attachments, programs should check the SQLCODE or SQLSTATE returned in the SQLCA after every SQL statement to determine its status. TerminationNormal termination for IMS/DB2 programs consists of closing cursors , if any, and following standard termination procedures for IMS programs. If an IMS program abends, IMS controls the termination and backout processing. ![]() |
![]() | |
Team-Fly ![]() |
Top |