Processing messages: Message Processing Programs
A Message Processing Program (MPP) is an online program that can access full-function databases, DEDBs, MSDBs, and Db2 for z/OS® databases. Unlike BMPs and batch programs, MPPs cannot access GSAM databases. MPPs can only run in DB/DC and DCCTL environments.
Using an MPP
The primary purpose of an MPP is to process requests from users at terminals and from other application programs. Ideally, MPPs are very small, and the processing they perform is tailored to respond to requests quickly. They process messages as their input, and send messages as responses.
- Message
- Data that is transmitted between any two terminals, application programs, or IMS systems. Each message has one or more segments.
MPPs are executed through transaction codes. When you define an MPP, you associate it with one or more transaction codes. Each transaction code represents a transaction the MPP is to process. To process a transaction, a user at a terminal enters a code for that transaction. IMS then schedules the MPP associated with that code, and the MPP processes the transaction. The MPP might need to access the database to do this. Generally, an MPP goes through these five steps to process a transaction:
- Retrieve a message from IMS.
- Process the message and access the database as necessary.
- Respond to the message.
- Repeat the process until no messages are forthcoming.
- Terminate.
When an MPP is defined, a system administrator makes decisions about the program's scheduling and processing. For each MPP, a system administrator specifies:
- The transaction's priority
- The number of messages for a particular transaction code that the MPP can process in a single scheduling
- The amount of time (in seconds) in which the MPP is allowed to process a single transaction
Defining priorities and processing limits gives system administration some control over load balancing and processing.
Although the primary purpose of an MPP is to process and reply to messages quickly, it is flexible in how it processes a transaction and where it can send output messages. For example, an MPP can send output messages to other terminals and application programs.