OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

3.4 Shutdown and release of logical terminals

This section explains how to issue functions from the UAP to shut down or release logical terminals. For details on how to use operation commands to shut down or release logical terminals, see the manual OpenTP1 Operation.

Organization of this section
(1) Displaying the status of a logical terminal
(2) Shutting down or releasing a logical terminal
(3) Deleting the content of the output queue of a logical terminal
(4) Functional differences between APIs and operation commands (shutdown and release of logical terminals)

(1) Displaying the status of a logical terminal

The function dc_mcf_tlsle() [CBLDCMCF('TLSLE ')] can be used to display the status of a logical terminal. Information such as the MCF identifier, the logical terminal name, and the logical terminal status (regardless of whether the terminal is shut down) can be displayed.

The logical terminal status is stored in the area specified inside the UAP.

(2) Shutting down or releasing a logical terminal

When a logical terminal is shut down, it cannot send messages requested by the UAP to the remote system. In this state, if the UAP makes a message transmission request, it is accepted normally, but the message to be transmitted remains in the output queue. Furthermore, in this state, scheduling of messages received from the remote system is done normally.

The function dc_mcf_tdctle() [CBLDCMCF('TDCTLE ')] is used to shut down a logical terminal. While the logical terminal is shut down, requests to send send-only messages remain in the output queue. Note that a logical terminal might also be shut down by an error.

On the other hand, when a logical terminal is released, its functions can be used.

The function dc_mcf_tactle() [CBLDCMCF('TACTLE ')] is used to release a logical terminal. When it is released, the messages remaining in the output queue are sent. Note that the logical terminal cannot be released if no connection has been established.

(3) Deleting the content of the output queue of a logical terminal

The function dc_mcf_tdlqle() [CBLDCMCF('TDLQLE ')] is used to discard the messages remaining in the output queue after a connection is established.

Issuing the function dc_mcf_tdlqle() deletes all messages remaining in the output queues of the disk queue and the memory queue, and starts an MCF event for each deleted message. Before the function dc_mcf_tdlqle() can be issued, the logical terminal must be shut down using the mcftdctle command or the function dc_mcf_tdctle().

(4) Functional differences between APIs and operation commands (shutdown and release of logical terminals)

The table below shows the functional differences between functions and operation commands used to shut down or release a logical terminal.

Table 3-5 Functional differences between functions and operation commands (shutdown and release of logical terminals)

Function name Operation command Functional differences
dc_mcf_tactle mcftactle
  1. Requests the release of a single logical terminal. Multiple or batch specification of logical terminals is not allowed.
  2. Releases both the logical terminal and its queue. Specification of only one or the other is not allowed.
dc_mcf_tdctle mcftdctle
  1. Requests the shutdown of a single logical terminal. Multiple or batch specification of logical terminals is not allowed.
  2. Shuts down both the logical terminal and its queue. Specification of only one or the other is not allowed.
dc_mcf_tdlqle mcftdlqle
  1. Requests the deletion of the output queue of a single logical terminal. Multiple or batch specification of logical terminals is not allowed.
  2. Deletes both the disk queue and the memory queue. Specification of only one or the other is not allowed.
  3. If the MCF event (ERREVTA) that reports discarding of an unsent message is defined in the MCF application definition, ERREVTA is reported. The reporting cannot be suppressed.
dc_mcf_tlsle mcftlsle
  1. Acquires the status of a single logical terminal. Multiple or batch specification of applications is not allowed.
  2. Only the status of the logical terminal can be acquired. Other additional information cannot be acquired.