Issuing a command response message

Many IBM®, customer, and vendor programs process operator commands. These command processors typically issue one or more WTO macros "in response to" the command.

When programs issue commands, they use the MGCRE macro (see Issuing operator commands from a program (MGCRE macro)), employing logic similar to the following:
  1. Issue a command with "my" console ID, and a command and response token (CART) value uniquely related to this command.
  2. Wait to receive a response message (marked as a response), back to "my" console, with the same CART value as the command input.
  3. Normally, consider the command "finished" when the first response is received. If a command processor issues more messages, the logic is more difficult.