Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Multi-Trans Processing z/OS MVS Planning: APPC/MVS Management SA23-1388-00 |
|||||||||||||||||||||||
A multi-trans program is typically coded with a multi-trans shell, an environment that performs initialization and termination processing, surrounding the part of the TP that holds conversations. Table 1 shows, at a very high level, how a multi-trans TP might work in an electronic mail application. It also shows how processing costs (resource responsibility) are divided between the multi-trans shell and individual users.
When the multi-trans program is scheduled in response to an inbound allocate request, the multi-trans shell gets control first and allocates general resources. It then calls for the initial inbound request with the Get_Transaction (ATBGTRN) callable service. When the conversation ends, the shell regains control and uses the Get_Transaction call again to get the next conversation request on the queue. Figure 1 gives an overview of initialization and termination processing in a multi-trans TP. Figure 1. Initialization and Termination in Multi-trans Processing
┌───────────────────────────┐ │ │ │ Multi-Trans Shell │ │ │ │ Initialization │ │ allocate data... │ │ │ ←─────────────┼─── Call ATBGTRN ←─────┐ │ Get_Transaction │ IF RC > 4 THEN │ │ │ terminate │ │ │ │ELSE │ │ │ │ ┌────────────┐ │ │ │ └─→ │ │ │ │ │Transaction │ │ │ ←────────────┼──────┼── │ │ │ Accept_ . │ │ │ │ │ Conversation . │ │ │ │ │ . │ │ │ │ │ . │ └─────┬──────┘ │ │ │ ↓ │ │ ←─────────────┼────── Call ATBRTRN │ │ Return_transaction │ ┌───────────────┐ │ │ │ │ clean-up │ │ │ │ │ reallocate... │ │ │ │ └─────┬─────────┘ │ │ │ └───────────┘ │ └───────────────────────────┘ To use multi-trans scheduling, a TP must define in its TP profile both a schedule type of multi-trans, and a special user ID (generic ID) for multi-trans shell processing. The generic ID contained in the TP profile entry identifies the environment for the multi-trans shell. The shell runs under this generic ID during initialization, while it allocates general resources for the TP to use. The generic ID remains in effect until the first successful Get_Transaction call, when the environment is personalized to the user ID associated with the inbound request. That personalized environment covers the entire conversation and remains in effect until the next Get_Transaction call, or until the shell explicitly returns to its generic environment, typically to perform cleanup or data set reallocations between conversations. To return to its generic user ID, the shell can call the Return_Transaction (ATBRTRN) service. The multi-trans shell can process an initial inbound Allocate request without first issuing Get_Transaction; in this case, the generic ID— not the user ID associated with the inbound request— identifies the conversation being processed. Using the multi-trans shell's generic ID this way can be useful when:
|
Copyright IBM Corporation 1990, 2014
|