OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
#include <dcvrpc.h> DCLONG dc_rpc_call_s(DCCLT_ID cltid, char *group, char *service, char *in, DCULONG *in_len, char *out, DCULONG *out_len, DCLONG flags)
#include <dcvrpc.h> int dc_rpc_call(char *group, char *service, char *in, DCULONG *in_len, char *out, DCULONG *out_len, DCLONG flags)
#include <dcvrpc.h> DCLONG dc_rpc_call_s(DCCLT_ID cltid, char CLTFAR *group, char CLTFAR *service, char CLTFAR *in, DCULONG CLTFAR *in_len, char CLTFAR *out, DCULONG CLTFAR *out_len, DCLONG flags)
#include <dcvrpc.h> int dc_rpc_call(char CLTFAR *group, char CLTFAR *service, char CLTFAR *in, DCULONG CLTFAR *in_len, char CLTFAR *out, DCULONG CLTFAR *out_len, DCLONG flags)
Requests an SPP service. Calls a service function, specifying the service group name and service name, and receives a response from the service function.
OpenTP1 must be running on the server UAP node to which the service request is sent. The dc_rpc_call_s function returns a DCRPCER_NET_DOWN, DCRPCER_OLTF_NOT_UP, or DCRPCER_OLTF_INITIALIZING error if OpenTP1 is not running (or is initializing).
The function returns a DCRPCER_SERVICE_CLOSED error if the target service group is shut down when the dc_rpc_call_s function is executed.
If the target service group is terminating or has been terminated by commands such as the dcsvstop command, the function returns a DCRPCER_SERVICE_TERMINATING, DCRPCER_SERVICE_CLOSED, or DCRPCER_NO_SUCH_SERVICE_GROUP error. The actual value returned depends on the timing of the dc_rpc_call_s function call.
A socket-receiving type server concurrently controls messages by specifying max_socket_msg and max_socket_msglen in the user service definition. This sometimes prevents the user from receiving a service request. If a service request cannot be received, the dc_rpc_call_s function returns with a DCRPCER_SERVER_BUSY error. If this value is returned, the CUP may make a service request by reexecuting the process after a certain time.
To communicate with XDM/DCCM3 in 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 the dc_rpc_call_s function.
The CUP reserves an area (out) for the service function response. The CUP also sets the following values for the dc_rpc_call_s function:
The input parameter, input parameter length, and response length values set for the dc_rpc_call_s function by the CUP are transferred to the service function without modification. The response length is ignored if the function requests a no-response type service.
The maximum values for in_len and out_len are defined with DCRPC_MAX_MESSAGE_SIZE# in the dcvrpc.h header file.
The following values are available after the completion of service function processing.
out_len contains the actual length of the response returned from the service function.
For synchronous response type RPCs (DCNOFLAGS set in flags), out and out_len can be referenced after the dc_rpc_call_s function returns. For no-response type RPCs (DCRPC_NOREPLY set in flags), out and out_len cannot be referenced. Also, out and out_len cannot be referenced when the dc_rpc_call or function returns an error.
The function returns a DCRPCER_REPLY_TOO_BIG error if the response is larger than the response area (out) reserved by the CUP.
DCNOFLAGS|DCRPC_TPNOTRAN
Return Value | Value (decimal) |
Meaning |
---|---|---|
DC_OK | 0 | Normal termination |
DCRPCER_INVALID_ARGS | -2401 | Invalid argument |
DCRPCER_PROTO | -2402 | The dc_rpc_open_s function has not been executed. |
DCRPCER_NO_BUFS | -2404 | A sufficient amount of buffer could not be secured or resources became insufficient. |
DCRPCER_NET_DOWN | -2406 | Network error |
DCRPCER_TIMED_OUT | -2407 | The dc_rpc_call_s function processing timeout. Alternatively the service-requesting SPP aborted before completion of the processing. |
DCRPCER_MESSAGE_TOO_BIG | -2408 | Input parameter length exceeds the maximum. |
DCRPCER_REPLY_TOO_BIG | -2409 | Returned response length exceeds the area provided by the CUP. |
DCRPCER_NO_SUCH_SERVICE_GROUP | -2410 | Possible causes are as follows:
|
DCRPCER_NO_SUCH_SERVICE | -2411 | An undefined service name was specified. |
DCRPCER_SERVICE_CLOSED | -2412 | Service group containing the specified service is shut down. |
DCRPCER_SERVICE_TERMINATING | -2413 | Specified service is terminating. |
DCRPCER_SERVICE_NOT_UP | -2414 | 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 time is specified). |
DCRPCER_OLTF_NOT_UP | -2415 | OpenTP1 is not running on the specified service node. Alternatively, communication is impossible because the TP1/Client is disconnected from the server during a transaction. |
DCRPCER_SYSERR_AT_SERVER | -2416 | A system error occurred for the specified service. |
DCRPCER_NO_BUFS_AT_SERVER | -2417 | Insufficient memory for the specified service |
DCRPCER_SYSERR | -2418 | System error |
DCRPCER_INVALID_REPLY | -2419 | Response length returned to OpenTP1 from the service function is not within the range: 1 to DCRPC_MAX_MESSAGE_SIZE#. |
DCRPCER_OLTF_INITIALIZING | -2420 | OpenTP1 is initializing on the specified service node. |
DCRPCER_NO_BUFS_RB | -2423 | Insufficient memory |
DCRPCER_SYSERR_RB | -2424 | System error |
DCRPCER_SYSERR_AT_SERVER_RB | -2425 | A system error occurred for the specified service. |
DCRPCER_REPLY_TOO_BIG_RB | -2426 | Returned response cannot be contained in the area allocated by the CUP. |
DCRPCER_TRNCHK | -2427 | Transaction attribute mismatch is found among SPPs in the environment of the inter-node load balancing function. Alternatively, the version of OpenTP1 on the node used for load balancing is too old to execute the inter-node load balancing function. The return value comes only when a service request is made to the SPPs using the inter-node load balancing function. |
DCRPCER_CONNFREE | -2442 | The permanent connection has been released. |
DCRPCER_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. |
DCRPCER_SERVER_BUSY | -2456 | The target server that receives requests from socket cannot receive a service request. |
DCRPCER_TESTMODE | -2466 | 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 all of the following conditions existed:
|
DCRPCER_NOT_TRN_EXTEND | -2467 | After a chained RPC has been used for transaction processing, the dc_rpc_call_s function that has DCRPC_TPNORTAN set for flags issues a service request. |
DCRPCER_SECCHK | -2470 | The service-requested SPP is protected by the security feature. The UAP that called the dc_rpc_call_s function has no access privilege for the server UAP. |
DCRPCER_TRNCHK_EXTEND | -2472 | Transaction branch 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, DCRPC_TPNOTRAN is not set at flags in a service request qualified by a domain in a transaction. |
DCRPCER_SERVICE_TERMINATED | -2478 | 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, DCRPCER_TIMED_OUT or DCRPCER_SERVICE_NOT_UP returns as the return value. |
DCRPCER_VERSION_CHECK | -2479 | Since the version of service-requested TP1/Server Base is old (before 03-03), the data compression cannot be used. This return value returns when the service is requested within the range of the transaction. |
DCCLTER_INVALID_CLTID | -2544 | The client ID specified in cltid differs from the client ID received by the dc_clt_cltin_s function. |
DCRPCER_PORT_IN_USE | -2547 | The specified port number is in use. Alternatively, port numbers that can be assigned automatically by the operating system are insufficient. |
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.