OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
(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 'STRAPHST'.
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 9(9) COMP.
02 data-name-E PIC X(n).
(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 'STRAPHST'.
02 data-name-B PIC X(5).
02 FILLER PIC X(3).
02 data-name-C PIC S9(9) COMP VALUE ZERO.
02 FILLER PIC 9(9) COMP.
02 data-name-E PIC X(n).
(2) Purpose
CBLDCCLS('STRAPHST') sets the host name and port number of the node to which you want to send a request to establish a permanent connection. The host name and port number set by these programs prevail over those specified in DCCLTRAPHOST in the client environment definition. After CBLDCCLS('STRAPHST') is executed, CBLDCCLS('CONNECT ') uses the host name and port number specified in CBLDCCLS('STRAPHST').
You may want to restore the host name and port number that were used before CBLDCCLS('STRAPHST') was executed. To do this, before executing CBLDCCLS('STRAPHST') to set a new host name and port number, execute CBLDCCLS('GTRAPHST') to acquire the current host name and port number. Then, after executing CBLDCCLS('STRAPHST') to set a new host name and port number, reexecute the function specifying the previously acquired host name and port number.
(3) Data area where the UAP sets values
- data-name-A
Set VALUE 'STRAPHST' as a request code for setting the destination of a request to establish a permanent connection.
- data-name-C
Set 0.
- data-name-D
Specify the client ID received with CBLDCCLS('CLTIN ') or CBLDCCLS('EXCLTIN ').
- data-name-E
Specify the host name and port number of the node to which you want to send a request to establish a permanent connection. You can specify an IP address in decimal dot notation for the host name.
- Form:
- host-name[:port-number][,host-name[:port-number],...]
- host-name ~<character string>
In host-name, specify the host name of the node to which you want to send a request to establish a permanent connection.
You can specify a maximum of 63# characters for the host name. When specifying multiple host names, you can specify a maximum of 255# characters, including port numbers, in data-name-E.
- port-number ~<unsigned integer>((5001 to 65535))
In port-number, specify the port number of the node to which you want to send a request to establish a permanent connection.
# If you specify 00000008 for DCCLTOPTION in the client environment definition, you can specify a maximum of 255 characters for the host name. When specifying multiple host names, you can specify a maximum of 1023 characters, including port numbers, in data-name-E.
(4) Data area for which a value is returned
- data-name-B
A five-digit status code is returned.
(5) Status codes
Status code |
Meaning |
00000 |
The program normally terminated. |
02501 |
The value specified in an argument is incorrect. The request code (data-name-A) may be incorrect. |
02502 |
Possible causes are as follows:
- The program has already been executed in the transaction.
- A permanent connection is being established.
- CBLDCRPS('OPEN ') has not been executed.
|
02504 |
A necessary amount of buffer could not be allocated. |
02544 |
The client ID specified in data-name-D differs from the one received with CBLDCCLS('CLTIN ') or CBLDCCLS('EXCLTIN '). |
- This function does not change the value specified in DCCLTRAPHOST in the client environment definition.
- If you specify a blank at the beginning of data-name-E, DCCLTRAPHOST is placed in undefined status in the client environment definition. When DCCLTRAPHOST is not defined, CBLDCCLS('CONNECT ') establishes a permanent connection to the logical terminal of the CUP executing process or of DCCM3.
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.