To other programs and terminals
When you want to send an output message to a terminal other than, or in addition to, the terminal that sent the input message, you use an alternate PCB. You can set the alternate PCB for a specific logical terminal when the program's PSB is generated, or you can define the alternate PCB as being modifiable. A program can change the destination of a modifiable alternate PCB while the program is running, so you can send output messages to several alternate destinations.
The application program might need to respond to the originating terminal before the person at the originating terminal can send any more messages. This might occur when a terminal is in response mode or in conversational mode:
- Response mode can apply to a communication line, a terminal, or a
transaction. When response mode is in effect, IMS does not
accept any input from the communication line or terminal until the program has sent a response to
the previous input message. The originating terminal is unusable (for example, the keyboard locks)
until the program has processed the transaction and sent the reply back to the terminal.
If a response-mode transaction is processed, including Fast Path transactions, and the application does not insert a response back to the terminal through either the I/O PCB or alternate I/O PCB, but inserts a message to an alternate PCB (program-to-program switch), the second or subsequent application program must respond to the originating terminal and satisfy the response. IMS will not take the terminal out of response mode.
If an application program terminates normally and does not issue an
ISRTcall to the I/O PCB, alternate I/O PCB, or alternate PCB, IMS sends system message DFS2082I to the originating terminal to satisfy the response for all response-mode transactions, including Fast Path transactions.You can define communication lines and terminals as operating in response mode, not operating in response mode, or operating in response mode only if processing a transaction that is been defined as response mode. You specify response mode for communication lines and terminals on the TYPE and TERMINAL macros, respectively, at IMS system definition. You can define any transaction as a response-mode transaction; you do this on the TRANSACT macro at IMS system definition. Response mode is in effect if:- The communication line has been defined as being in response mode.
- The terminal has been defined as being in response mode.
- The transaction code has been defined as response mode.
- Conversational mode applies to a transaction. When a program is processing a conversational transaction, the program must respond to the originating terminal after each input message it receives from the terminal.
In these processing modes, the program must respond to the originating terminal. But sometimes the originating terminal is a physical terminal that is made up of two components—for example, a printer and a display. If the physical terminal is made up of two components, each component has a different logical terminal name. To send an output message to the printer part of the terminal, the program must use a different logical terminal name than the one associated with the input message; it must send the output message to an alternate destination. A special kind of alternate PCB is available to programs in these situations; it is called an alternate response PCB.
Definition: An alternate response PCB lets you send messages when exclusive, response, or conversational mode is in effect. See the next topic for more information.
Alternate response PCB
The destination of an alternate response PCB must be a logical terminal—you cannot use an alternate response PCB to represent another application program. When you use an alternate response PCB during response mode or conversational mode, the logical terminal represented by the alternate response PCB must represent the same physical terminal as the originating logical terminal.
In these processing modes, after receiving the message, the application program must respond by
issuing an ISRT call to one of the following:
- The I/O PCB.
- An alternate response PCB.
- An alternate PCB whose destination is another application program, that is, a program-to-program switch.
- An alternate PCB whose destination is an ISC link. This is allowed only for front-end switch
messages.
Related reading: For more information on front-end switch messages, see IMS Version 15.4 Exit Routines.
If one of these criteria is not met, message DFS2082I is sent to the terminal.
Express PCB
Consider specifying an alternate PCB as an express PCB. The express designation relates to
whether a message that the application program inserted is actually transmitted to the destination
if the program abnormally terminates or issues a ROLL, ROLB, or
ROLS call. For all PCBs, when a program abnormally terminates or issues a
ROLL, ROLB, or ROLS call, messages that were
inserted but not made available for transmission are cancelled while messages that were made
available for transmission are never cancelled.
Definition: An express PCB is an alternate response PCB that allows your program to transmit the message to the destination terminal earlier than when you use a nonexpress PCB.
For a nonexpress PCB, the message is not made available for transmission to its destination until
the program reaches a commit point. The commit point occurs when the program terminates, issues a
CHKP call, or requests the next input message and when the transaction has been
defined with MODE=SNGL.
For an express PCB, when IMS has the complete message, it
makes the message available for transmission to the destination. In addition to occurring at a
commit point, it also occurs when the application program issues a PURG call using
that PCB or when it requests the next input message.
You should provide the answers to the following questions to the data communications administrator to help in meeting your application's message processing requirements:
- Will the program be required to respond to the terminal before the terminal can enter another message?
- Will the program be responding only to the terminal that sends input messages?
- If the program needs to send messages to other terminals or programs as well, is there only one alternate destination?
- What are the other terminals to which the program must send output messages?
- Should the program be able to send an output message before it terminates abnormally?