Sending messages to other terminals and programs
When an application program processes a message from a terminal, it usually sends the response to the terminal that sent the input message. But sometimes you might want to send output messages to a terminal other than the originating terminal, or to other terminals in addition to the originating terminal. You might also want to send messages to other application programs.
When you use an alternate PCB:
- If you want to send output messages to one alternate destination, define the alternate PCB for that destination.
- If you want to send output messages to more than one alternate destination, and you want to be
able to change the destination of the alternate PCB, define the alternate PCB as modifiable during
program specification block (PSB) generation. Then, before you issue the
ISRT
call, you issue aCHNG
call to set the destination of the alternate modifiable PCB for the destination program or terminal.The express alternate PCB is a special kind of alternate PCB that is defined during PSB generation, by specifying EXPRESS=YES.
When you use an express alternate PCB, messages you send using that PCB are sent to their final destinations immediately. Messages sent with other PCBs are sent to temporary destinations until the program reaches a commit point. Messages sent with express PCBs are sent if the program subsequently terminates abnormally, or issues one of the rollback calls:
ROLL
,ROLB
, orROLS
. Using an express alternate PCB in this kind of situation is a way to ensure that the program can notify the person at the terminal, even if abnormal termination occurs. For all PCBs, when a program abnormally terminates or issues aROLL
,ROLB
, orROLS
call, messages inserted but not made available for transmission are cancelled, while messages made available for transmission are never cancelled.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 the transaction has been defined with MODE=SNGL.For an express PCB, when IMS TM knows that it has the complete message, it makes the message available for transmission to the destination. In addition to occurring at a commit point, this also occurs when the application program issues a
PURG
call using that PCB or requests the next input message.A PSBGEN can also specify an alternate PCB as an alternate response PCB defined during PSB generation.
- If you want to send a message to an LU 6.2 device, you can specify the LU 6.2 descriptor name that is associated with that device. IMS internally performs the uppercase translation of the destination name (CNT or SMB).