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

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

6.4.1 CBLDCCLS ('CONNECT ') - Establish permanent connection

Organization of this subsection
(1) Form
(2) Purpose
(3) Data area where the UAP sets values
(4) Data area for which a value is returned
(5) Status codes
(6) Notes

(1) Form

(a) In a multi-thread environment
PROCEDURE DIVISION
 
CALL 'CBLDCCLS' USING identifier-1
 
DATA DIVISION
 
01 identifier-1.
   02 data-name-A PIC X(8)  VALUE 'CONNECT '.
   02 data-name-B PIC X(5).
   02 FILLER     PIC X(3).
   02 data-name-C PIC S9(9) COMP VALUE ZERO.
   02 data-name-D PIC S9(9) COMP.
 
(b) In a single-thread environment
PROCEDURE DIVISION
 
CALL 'CBLDCCLT' USING identifier-1
 
DATA DIVISION
 
01 identifier-1.
   02 data-name-A PIC X(8)  VALUE 'CONNECT '.
   02 data-name-B PIC X(5).
   02 FILLER     PIC X(3).
   02 data-name-C PIC S9(9) COMP VALUE ZERO.
 

(2) Purpose

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

The CUP execution process for establishing the permanent connection is running on the OpenTP1 node specified in the data-name-D in the CBLDCCLS('CLTIN '), or 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 32 for data-name-C in CBLDCCLS('CONNECT ').

To 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. Also specify 0 for data-name-C in CBLDCCLS('CONNECT ').

(3) Data area where the UAP sets values

(4) Data area for which a value is returned

(5) Status codes

Status code Meaning
00000 Normal termination. Or, permanent connection has already been established.
02501 Invalid value for the data name. The request code (data-name-A) may be invalid.
02502
  • CBLDCCLS('CONNECT ') is issued in the transaction, or CBLDCRPS ('OPEN ') is not issued.
  • The establishment request to OpenTP1 is issued while permanent connection with DCCM3 has already been established.
  • Alternatively, the establishment request to DCCM3 is issued while permanent connection with OpenTP1 has already been established.
02504 A necessary amount of buffer could not be allocated.
02506 Communication error
02507 A timeout error occurred during establishment of permanent connection.
02515 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. Check whether clt_conf is specified correctly in the system service configuration definition.
  • The CUP executing process has not started. Check whether clt_cup_conf is specified correctly in the client service definition.
02518 System error
02539 The establishment request to the DCCM3 logical terminal is issued with an invalid host name.
02544 The client ID specified in data-name-D differs from the one received with CBLDCCLS('CLTIN ') or CBLDCCLS('EXCLTIN ').
02547 The specified port number is in use, or port numbers that can be assigned automatically by the operating system are insufficient.

(6) Notes