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

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

6.3.3 CBLDCRPS('CALL ') - Remote service request

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 'CBLDCRPS' USING identifier-1 identifier-2 identifier-3
 
DATA DIVISION
 
01 identifier-1.
   02 data-name-A PIC X(8)  VALUE 'CALL    '.
   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.
   02 data-name-E PIC X(32).
   02 data-name-F PIC X(32).
   02 data-name-G PIC 9(9)  COMP.
01 identifier-2.
   02 data-name-H PIC S9(9) COMP.
   02 data-name-I PIC X(n).
01 identifier-3.
   02 data-name-J PIC S9(9) COMP.
   02 data-name-K PIC X(n).
 
(b) In a single-thread environment
PROCEDURE DIVISION
 
CALL 'CBLDCRPC' USING identifier-1 identifier-2 identifier-3
 
DATA DIVISION
 
01 identifier-1.
   02 data-name-A PIC X(8)  VALUE 'CALL    '.
   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.
   02 data-name-E PIC X(32).
   02 data-name-F PIC X(32).
01 identifier-2.
   02 data-name-H PIC S9(9) COMP.
   02 data-name-I PIC X(n).
01 identifier-3.
   02 data-name-J PIC S9(9) COMP.
   02 data-name-K PIC X(n).
 

(2) Purpose

Requests an SPP service by calling the service program that matches the service group name and the service name and receiving its response.

OpenTP1 must be active for the node corresponding to the server UAP for which the service is requested. If OpenTP1 is inactive due to a startup procedure, for example, the CBLDCRPS('CALL ') program returns an error with status code 02406, 02415, or 02420. The program returns an error with status code 02412 when it is executed but the target service group is shut down. The program returns an error with status code 02413, 02412, or 02410 when it is executed but the target service group is terminating or has been terminated due to a dcsvstop command, for example. Which status code returns depends on the timing when the CBLDCRPS('CALL ') program was executed.

A socket-receiving type server concurrently controls messages by specifying max_socket_msg and max_socket_msglen in the user service definition. This may prevent receiving service requests. In this case, CBLDCRPS('CALL ') returns an error with status code 02456. When this value returns, wait a while, then reexecute the CUP. You may succeed in the service request.

For the normal communication mode, specify the host name and port number of the XDM/DCCM3 logical terminal in DCCLTSERVICEGROUPLIST in the client environment definition, and then execute CBLDCRPS('CALL ').

(a) Values passed to server UAP

The CUP allocates an area (data-name-K) for responding to the service program. It also specifies the following values for CBLDCRPS('CALL ').

These values are same as those specified for CBLDCRPS('CALL ') in the CUP and are passed (and unchanged) to the service program. When you call services of a service program that returns no response, the response length, if specified, is ignored. The maximum values for the input parameter length and response length are defined with DCRPC_MAX_MESSAGE_SIZE# in the dcvrpc.h header file.

# If you specify 2 or a larger value for DCCLTRPCMAXMSGSIZE in the client environment definition, the value you specify is used rather than the value of DCRPC_MAX_MESSAGE_SIZE (1 megabyte).
(b) Values returned from server UAP

You can reference the following values after termination of the service program.

Data-name-J shows the length of a response actually returned from the service program.

After CBLDCRPS('CALL ') returns, a synchronous-response type RPC (data-name-C set to 0) can reference data-name-K and data-name-J. A no-response type RPC (data-name-C set to 1) cannot reference these values. When CBLDCRPS('CALL ') returns an error, data-name-K and data-name-J cannot be referenced.

When the returned response exceeds the response area (data-name-K) allocated by the CUP, the program returns an error with status code 02409.

(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
02401 Invalid value for the data name. The request code (data-name-A) may be invalid.
02402 CBLDCRPS('OPEN ') has not been executed.
02403 One of the following errors occurs.
  • Initialization failed.
  • No user authentication is performed.
  • The client environment definition is specified invalidly.
02404 Insufficient memory
02406 Network error
02407 Timeout occurred during execution of CBLDCRPS('CALL '). Alternatively, the SPP requested to provide a service terminated abnormally before completing the processing.
02408 The input parameter length exceeds the maximum value.
02409 The returned response length exceeds the area provided by the CUP.
02410 The service group name specified for data-name-F is undefined.
02411 The service name specified for data-name-E is undefined.
02412 The service group that contains the service specified with data-name-E is shut down.
02413 The specified service is being terminated.
02414 The SPP requested to provide a service was not started, or terminated abnormally before completing the processing. This value is returned when 0 is specified for DCWATCHTIM in the client environment definition (infinite response wait is specified).
02415 OpenTP1 is inactive for the node corresponding to the specified service.
02416 The specified service caused a system error.
02417 The specified service caused insufficient memory.
02418 System error
02419 The response length returned from the service program to OpenTP1 is outside the range from 1 to DCRPC_MAX_MESSAGE_SIZE#.
02420 OpenTP1 is starting up on the service-requested node.
02423 Insufficient memory
02424 System error
02425 The specified service caused a system error.
02426 The returned response exceeds the area provided by the CUP.
02427 Two or more SPPs use different transaction attributes when the inter-node load balancing facility is used. This status code returns only when a service is requested for SPP that uses the inter-node load balancing facility.
02442 A permanent connection was released.
02456 A service request was issued to the socket-receiving type server, which could not receive the request.
02466 A service request was issued to an SPP for which test_mode=no was specified in the user service definition in an environment where DCUTOKEY was specified in the client environment definition.
Alternatively, a function was called in an environment where the following conditions were satisfied:
  • DCUTOKEY was specified in the client environment definition.
  • A permanent connection with the CUP executing process was being established.
  • The service request was issued outside the transaction.
  • A service request was issued to an SPP for which a value other than test_mode=no was specified in the user service definition.
02467 After a chained RPC has been used for transaction processing, CBLDCRPS('CALL ') that sets 32 as data name C issues a service request.
02470 The service-requested SPP is protected by the security facility. The UAP that called CBLDCRPS('CALL ') has no access right to the server UAP.
02472 Transaction branches cannot be started because the number of transaction branches that can be started concurrently has been exceeded, or because the maximum number of child transaction branches that can be started from one transaction branch has been exceeded. Alternatively, 32 is not set at data name C in a service request qualified by a domain in a transaction.
02478 The SPP requested to provide a service terminated abnormally before completing the processing. This value is returned when 00000001 is specified for DCEXTENDFUNCTION in the client environment definition. If 00000000 is specified or the specification is omitted, 02407 or 02414 returns as the status code.
02479 Since the version of service-requested TP1/Server Base is old (before 03-03), the data compression cannot be used. This status code is returned when the service is requested within the range of the transaction.
02544 The client ID specified for data-name-G differs from the one received with CBLDCCLS('CLTIN ') or CBLDCCLS('EXCLTIN ').
02547 The specified port number is in use. Alternatively, port numbers that can be assigned automatically by the operating system are insufficient.

# If you specify 2 or a larger value for DCCLTRPCMAXMSGSIZE in the client environment definition, the value you specify is used rather than the value of DCRPC_MAX_MESSAGE_SIZE (1 megabyte).

(6) Notes