Batch processing online: batch-oriented BMPs

A batch-oriented BMP performs batch-type processing in any online environment. When run in the DB/DC or DCCTL environment, a batch-oriented BMP can send its output to the IMS message queue to be processed later by another application program. Unlike a transaction-oriented BMP, a batch-oriented BMP cannot access the IMS message queue for input.

Data a batch-oriented BMP can access

In the DBCTL environment, a batch-oriented BMP can access full-function databases, Db2 for z/OS® databases, DEDBs, z/OS files, and GSAM databases. In the DB/DC environment, a batch-oriented BMP can access all of these types of databases, as well as Fast Path MSDBs. In the DCCTL environment, this program can access Db2 for z/OS databases, z/OS files, and GSAM databases.

Using a batch-oriented BMP

A batch-oriented BMP can be simply a batch program that runs online. (Online requests are processed by the IMS DB/DC, DBCTL, or DCCTL system rather than by a batch system.) You can even run the same program as a BMP or as a batch program.

Recommendation: If the program performs a large number of database updates without issuing checkpoints, consider running it as a batch program so that it does not degrade the performance of the online system.

To use batch-oriented BMPs most efficiently, avoid a large amount of batch-type processing online. If you have a BMP that performs time-consuming processing such as report writing and database scanning, schedule it during non-peak hours of processing. This will prevent it from degrading the response time of MPPs.

Because BMPs can degrade response times, your response time requirements should be the main consideration in deciding the extent to which you will use batch message processing. Therefore, use BMPs accordingly.

Recovering a batch-oriented BMP

Issuing checkpoint calls is an important part of batch-oriented BMP processing, because commit points do not occur automatically, as they do in MPPs, transaction-oriented BMPs, and IFPs. Unlike most batch programs, a BMP shares resources with MPPs. In addition to committing database changes and providing places from which to restart (as for a batch program), checkpoints release resources that are locked for the program.

If a batch-oriented BMP fails, IMS and Db2 for z/OS back out the database updates the program has made since the last commit point. You then restart the program with JCL. If the BMP processes z/OS files, you must provide your own method of taking checkpoints and restarting.

Converting a batch program to a batch-oriented BMP

If you have IMS TM or are running in the DBCTL environment, you can convert a batch program to a batch-oriented BMP.

  • If you have IMS TM, you might want to convert your programs for these reasons:
    • BMPs can send output to the message queues.
    • BMPs can access DEDBs and MSDBs.
    • BMPs simplify program recovery because logging goes to a single system log. If you use DASD for the system log in batch, you can specify that you want dynamic backout for the program. In that case, batch recovery is similar to BMP recovery, except, of course, with batch you need to manage multiple logs.
    • Restart can be done automatically from the last checkpoint without changing the JCL.
  • If you are using DBCTL, you might want to convert your programs for these reasons:
    • BMPs can access DEDBs.
    • BMPs simplify program recovery because logging goes to a single system log. If you use DASD for the system log in batch, you can specify that you want dynamic backout for the program. In that case, batch recovery is similar to BMP recovery, except, of course, with batch you need to manage multiple logs.
  • If you are running sysplex data sharing and you either have IMS TM or are using DBCTL, you might want to convert your program. This is because using batch-oriented BMPs helps you stay within the sysplex data-sharing limit of 32 connections for each OSAM or VSAM structure.

    If you use data sharing, you can run batch programs concurrently with online programs. If you do not use data sharing, converting a batch program to a BMP makes it possible to run the program with BMPs and other online programs.

    Also, if you plan to run your batch programs offline, converting them to BMPs enables you to run them with the online system, instead of waiting until the online system is not running. Running a batch program as a BMP can also keep the data more current.

  • If you have IMS TM or are using DBCTL, you can have a program that runs as either a batch program or a BMP.
    Recommendation: Code your checkpoints in a way that makes them easy to modify. Converting a batch program to a BMP or converting a batch program to use data sharing requires more frequent checkpoints. Also, if a program fails while running in a batch region, you must restart it in a batch region. If a program fails in a BMP region, you must restart it in a BMP region.
The requirements for converting a batch program to a BMP are:
  • The program must have an I/O PCB. You can obtain an I/O PCB in batch by specifying the compatibility (CMPAT) option in the program specification block (PSB) for the program.

    Related Reading: For more information on the CMPAT option in the PSB, see IMS Version 15.4 System Utilities.

  • BMPs must issue checkpoint calls more frequently than batch programs.