OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/J

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

2.9.3 Sending terminal identification information to a DCCM3 logical terminal

When you wish to use a permanent connection to communicate with a DCCM3 logical terminal, you can send terminal identification information to a DCCM3 logical terminal and fix the DCCM3 logical terminal that is to be allocated to the CUP.

Organization of this subsection
(1) How to send and receive messages at a DCCM3 logical terminal
(2) Notifying the terminal identification information
(3) Notes about reporting the terminal identification information to the DCCM3 logical terminal

(1) How to send and receive messages at a DCCM3 logical terminal

To use a DCCM3 logical terminal, the communication target TP1/Client/J is defined as a logical terminal that is identified by the IP address and port number of a DCCM3 logical terminal; messages are sent and received on the basis of logical terminals.

When multiple CUPs are started from the same machine, requests from all these CUPs have the same IP address. This means that if multiple CUPs issue service requests to the same DCCM3 logical terminal port, identification of the CUPs by the DCCM3 definition is not possible. Therefore, if multiple corresponding DCCM3 logical terminals are defined, the DCCM3 logical terminal to which a CUP is allocated becomes undefined. If the DCCM3 logical terminal that is to accept a service request changes, the order of server processing at DCCM3 cannot be guaranteed. This may cause problems with some applications.

(2) Notifying the terminal identification information

When a CUP establishes permanent connection with a DCCM3 logical terminal, the DCCM3 logical terminal to be allocated to the CUP can be fixed by reporting the terminal identification information to the DCCM3 logical terminal. This is called the terminal identification information setting facility. This facility enables you to always allocate a CUP to the same DCCM3 logical terminal. DCCM3 calls this the function for allocating a fixed terminal.

The following figures show the relationship between a CUP and a DCCM3 logical terminal when the terminal identification information setting facility is not used and when it is used.

Figure 2-31 Relationship between CUP and DCCM3 logical terminal (when the terminal identification information setting facility is not used)

[Figure]

Figure 2-32 Relationship between CUP and DCCM3 logical terminal (when the terminal identification information setting facility is used)

[Figure]

You can use the terminal identification information setting facility by one of the following methods:

Method 1
  1. Specify DCCM3 logical terminal host name in the dchost operand of the TP1/Client/J environment definition.
  2. Specify the port number of the DCCM3 logical terminal in the dchost or dcrapport operand of the TP1/Client/J environment definition.
  3. Set the terminal identification information in the setConnectInformation method, and then call the method.
  4. Establish a permanent connection with the DCCM3 logical terminal using one of the following methods:
    [Figure] Call the openConnection method. If the method has parameters, specify DCCM3 logical terminal host name in the host parameter and the port number of the DCCM3 logical terminal in the port parameter.
    [Figure] Specify Y in the dcrapautoconnect operand of the TP1/Client/J environment definition, and then call the rpcCall method.

Method 2
  1. Specify DCCM3 logical terminal host name in the dchost operand of the TP1/Client/J environment definition.
  2. Specify the port number of the DCCM3 logical terminal in the dchost or dcrapport operand of the TP1/Client/J environment definition.
  3. Set the terminal identification information in the dccltconnectinf operand of the TP1/Client/J environment definition.
  4. Establish a permanent connection with the DCCM3 logical terminal using one of the following methods:
    [Figure] Call the openConnection method. If the method has parameters, specify DCCM3 logical terminal host name in the host parameter and the port number of the DCCM3 logical terminal in the port parameter.
    [Figure] Specify Y in the dcrapautoconnect operand of the TP1/Client/J environment definition and then call the rpcCall method.
    Note
    If you set the terminal identification information in the dccltconnectinf operand of the TP1/Client/J environment definition and also in the setConnectInformation method, the setting in the setConnectInformation method takes effect, and the value set in the dccltconnectinf operand is ignored until the rpcOpen method is called again after the setConnectInformation is called.

(3) Notes about reporting the terminal identification information to the DCCM3 logical terminal