OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

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

4.4.1 dc_clt_connect_s - Establish permanent connection

Organization of this subsection
(1) Form
(2) Purpose
(3) Arguments set by UAPs
(4) Return values
(5) Notes

(1) Form

(a) _s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_connect_s(DCCLT_ID cltid, DCLONG flags)
 
(b) Non-_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_connect(DCLONG flags)
 

(2) Purpose

Establishes permanent connection with a CUP execution process, a RAP-processing server or DCCM3 logical terminal.

The CUP execution process for establishing the permanent connection is running on the OpenTP1 node specified in the target_host in the dc_clt_cltin_s function, specified in DCCLTRAPHOST or DCHOST in the client environment definition.

To establish the permanent connection with the DCCM3 logical terminal, define DCCLTDCCMHOST and DCCLTDCCMPORT in the client environment definition. Also specify DCCLT_DCCM3 for the argument flags in the dc_clt_connect_s function.

When you establish permanent connection with the DCCM3 logical terminal using the remote API facility, provide DCCLTRAPHOST with the host name and the port number for the DCCM3 logical terminal. Specify DCNOFLAGS for flags of the dc_clt_connect_s function.

(3) Arguments set by UAPs

(4) Return values

Return Value Value (decimal) Meaning
DC_OK 0 Normal termination. Or, permanent connection has already been established.
DCCLTER_INVALID_ARGS -2501 Invalid argument
DCCLTER_PROTO -2502 The dc_clt_connect or dc_clt_connect_s function is issued in the transaction, or the dc_rpc_open_s function is not issued. The establishment request to OpenTP1 is issued while permanent connection with DCCM3 has already been established. Or, the establishment request to DCCM3 is issued while permanent connection with OpenTP1 has already been established.
DCCLTER_NO_BUFS -2504 A necessary amount of buffer could not be allocated. Alternatively, resources became insufficient.
DCCLTER_NET_DOWN -2506 Communication error
DCCLTER_TIMED_OUT -2507 A timeout error occurred during establishment of permanent connection.
DCCLTER_OLTF_NOT_UP -2515 One of the following causes is likely:
  • The OpenTP1 server or the DCCM3 logical terminal has not started.
  • The client extended service has not started. clt_conf is specified incorrectly in the system service configuration definition.
  • The CUP executing process has not started. clt_cup_conf is specified incorrectly in the client service definition.
DCCLTER_SYSERR -2518 System error
DCCLTER_WRONG_HOST -2539 The establishment request to the DCCM3 logical terminal is issued with an invalid host name.
DCCLTER_INVALID_CLTID -2544 The client ID specified in cltid differs from the client ID received by the dc_clt_cltin_s function.
DCCLTER_PORT_IN_USE -2547 The specified port number is in use, or port numbers that can be assigned automatically by the operating system are insufficient.

(5) Notes