How tasks are started

Work is started in CICS®--that is, tasks are initiated--in one of two ways:

  1. From unsolicited input
  2. By automatic task initiation (ATI)

Automatic task initiation occurs when:

The primary mechanism for initiating tasks, however, is unsolicited input. When a user transmits input from a terminal which is not the principal facility of an existing task, CICS creates a task to process it. The terminal that sent the input becomes the principal facility of the new task.

Principal facility
CICS allows a task to communicate directly with only one terminal, namely its principal facility. CICS assigns the principal facility when it initiates the task, and the task "owns" the facility for its duration. No other task can use that terminal until the owning task ends. If a task needs to communicate with a terminal other than its principal facility, it must do so indirectly, by creating another task that has the terminal as its principal facility. This requirement arises most commonly in connection with printing, and how you can create such a task is explained in Using CICS printers.
Notes:
  1. You can specify a terminal destination other than your principal facility in a SEND command if the destination is under TCAM control, an apparent exception to this rule. This is possible because communications with TCAM terminals are always queued. Thus your task does not write directly to the destination terminal, but instead writes to a queue that will be delivered to it subsequently by TCAM (see Using TCAM) . BMS routing, described in Message routing, is another form of indirect access to other terminals by queues.
  2. Start of changeIn CICS TS 3.1, local TCAM terminals are not supported. The only TCAM terminals supported are remote terminals connected to a pre-CICS TS 3.1 terminal-owning region by the DCB (not ACB) interface of TCAM.End of change

Unsolicited inputs from other systems are handled in the same way: CICS creates a task to process the input, and assigns the conversation over which the input arrived as the principal facility. (Thus a conversation with another system may be either a principal or alternate facility. In the case where a task in one CICS region initiates a conversation with another CICS region, the conversation is an alternate facility of the initiating task, but the principal facility of the partner task created by the receiving system. By contrast, a terminal is always the principal facility.)

Alternate facility
Although a task may communicate directly with only one terminal, it can also establish communications with one or more remote systems. It does this by asking CICS to assign a conversation with that system to it as an alternate facility. The task "owns" its alternate facilities in the same way that it owns its principal facility. Ownership lasts from the point of assignment until task end or until the task releases the facility.

Not all tasks have a principal facility. Tasks that result from unsolicited input always do, by definition, but a task that comes about from automatic task initiation may or may not need one. When it does, CICS waits to initiate the task until the requested facility is available for assignment to the task.

[[ Contents Previous Page | Next Page Index ]]