TCQ Logical Queues

As Connect:Direct® Processes are submitted, they are placed in one of the four TCQ logical queues: Execution, Wait, Timer, and Hold.

As sessions are available, the TCQ releases Processes to begin execution according to the Process class and priority, as shown in the following figure:

Each Process in the queue is assigned a status. The queues and status values are identified in the following sections.

Execution Queue

Processes are placed in this queue after the connection to the SNODE occurs. Processes typically come from the Wait queue, but also can be placed in the Execution queue by a submit command with maxdelay= specified. After a Process successfully finishes, it is automatically deleted from the Execution queue. When a session is interrupted, the Process moves from the Execution queue to the Timer queue, if retry values are specified. If connection is not made before the retry values are exhausted or if retry values are not specified, the Process moves to the Hold queue with a status of HE. The following table displays the status values assigned in the Execution queue:

Status Comment
EX Process is executing between two Connect:Direct nodes.
PE Processes waiting for Process start messages to be exchanged between the PNODE and the SNODE. This is the initial queue status when a Process is submitted with maxdelay= specified.

Wait Queue

Processes are placed in the Wait queue while waiting for an available connection between the PNODE and the SNODE. Processes can come to the Wait queue from the Hold queue or the Timer queue. Processes also can be placed in the Wait queue by a submit command with no parameters specified, submit with retain=no, or submit with hold=no. After the connection is made, Processes automatically move to the Execution queue. The following table displays the status values assigned in the Wait queue:

Status Comment
WC The Process is ready to execute, but no session is available. This Process runs as soon as a new session is created or an existing session becomes available.
WR The Process is in retry status. The number of retries and intervals between retries is specified in the network map for the remote node.
WA The initial queue status when a Process is submitted without HOLD or RETAIN specified. This Process is ready to execute as soon as possible.

Hold Queue

Processes are placed in this queue while waiting for operator intervention before progressing to the Wait queue. This queue enables operators of the PNODE and SNODE to coordinate and control Process execution.

Processes are placed in the Hold queue by a submit command with retain=initial, retain=yes, or hold=yes parameters specified. Processes submitted with hold=call also are placed in the Hold queue. Processes are moved from the Timer queue to the Hold queue by a change process command with hold=yes specified. Processes are moved from the Hold queue to the Execution queue by a change process command with the release parameter specified.

The following table displays the status values assigned in the Hold queue:

Status Comment
HC The Process was submitted with hold=call specified. A session started from the remote node causes the Process to be moved to the Wait queue in WC status. The Process is placed in the Execution queue when the Process is selected for execution.
HI The Process was submitted with hold=yes. The Process can be released later by a change process command with release or hold=no specified.
HE A session error or other abnormal condition occurred.
HO A change process command with hold=yes was specified.
HR The Process was submitted with retain=yes or retain=initial specified and has already executed. The Process can be released later by a change process command with release specified.
HS The Process was suspended due to a server shutdown.

Timer Queue

Processes are placed in this queue by a submit command with the startt parameter specified. Processes in the Wait for Start Time (WS) status are waiting for the start time to arrive before moving to the Wait queue. Processes also are placed in the Timer queue in Retry (WR) status after an error, such as a line break or a lost connection. Connect:Direct automatically tries to execute the Process again based on the number of times to retry and the delay between retries as specified in the submit command, Process statement, network map parameters, or initialization parameters. Processes move from the Timer queue to the Wait queue. A change process command with hold=yes specified moves the specified Process from the Timer queue to the Hold queue.

The following table displays the status values assigned in the Timer queue:

Status Comment
RE The Process is in retry status. The number of retries and intervals between retries is specified in the network map or initialization parameters.
WS The Process was submitted with a start time (startt) or date that has not expired. When startt is reached, the Process is placed in the Wait queue for scheduling for execution.