Writing message-driven programs
A message-driven program is similar to an MPP: it retrieves messages and processes them, and it can read and update MSDBs, DEDBs, and full-function databases.
Message-driven programs can send messages to these destinations:
- The logical terminal that sent the input message, by issuing an
ISRT
call referencing the I/O PCB - A different component of the physical terminal that sent the input
message, by issuing an
ISRT
call referencing an alternate response PCB - A different physical terminal from the one that sent the input
message, by issuing an
ISRT
call referencing an alternate PCB
The message processing functions available to a message-driven
program have some restrictions. These restrictions apply only to messages
received or sent by the I/O PCB. The input message for a message-driven
program must be a single segment message. Therefore, GU
is
the only call you can use to obtain the input message. The response
message sent by the I/O PCB also must be a single segment message.
The transactions are in the response mode. This means that you must respond before the next message can be sent. You cannot use SPAs because a message-driven program cannot be a conversational program.
Not all of the system service calls are available. These system service calls are valid in a message-driven region:
CHKP
(basic)DEQ
INIT
LOG
SETS
ROLB
ROLS
However, other conditions might restrict their function in this environment. The options or calls issued using alternate terminal PCBs have no constraints.