OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
#include <dcvrpc.h> DCLONG dc_rpc_call_to_s( DCCLT_ID cltid, struct DCRPC_BINDING_TBL *direction, char *group, char *service, char *in, DCULONG *in_len, char *out, DCULONG *out_len, DCLONG flags)
#include <dcvrpc.h> DCLONG dc_rpc_call_to( struct DCRPC_BINDING_TBL *direction, char *group, char *service, char *in, DCULONG *in_len, char *out, DCULONG *out_len, DCLONG flags)
#include <dcvrpc.h> DCLONG dc_rpc_call_to_s( DCCLT_ID cltid, struct DCRPC_BINDING_TBL CLTFAR *direction, 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> DCLONG dc_rpc_call_to( struct DCRPC_BINDING_TBL CLTFAR *direction, char CLTFAR *group, char CLTFAR *service, char CLTFAR *in, DCULONG CLTFAR *in_len, char CLTFAR *out, DCULONG CLTFAR *out_len, DCLONG flags)
In the same way as the dc_rpc_call_s function, the dc_rpc_call_to_s function requests an SPP service. The dc_rpc_call_to_s function uses the host name, in addition to the service group name and service name, as a search key for the service function to restrict the nodes to which service requests are sent.
Before issuing the dc_rpc_call_to_s function, you must issue DCRPC_DIRECT_SCHEDULE() to create a DCRPC_BINDING_TBL structure. In the direction argument, specify the address of the DCRPC_BINDING_TBL structure. Other interfaces are the same as those for the dc_rpc_call_s function.
Return value | Value (decimal) | Meaning |
---|---|---|
DC_OK | 0 | Normal termination |
DCRPCER_INVALID_ARGS | -2401 | An invalid value is specified for an argument. |
DCRPCER_PROTO | -2402 | The dc_rpc_open_s function has not been executed. Alternatively, this function was issued while a permanent connection was being established or was issued within a transaction. |
DCRPCER_NO_BUFS | -2404 | A sufficient amount of buffer space could not be secured or resources became insufficient. |
DCRPCER_NET_DOWN | -2406 | Network error |
DCRPCER_TIMED_OUT | -2407 | A timeout occurred during processing of the dc_rpc_call_to_s function. Alternatively, the service-requested SPP terminated abnormally before completing the processing. |
DCRPCER_MESSAGE_TOO_BIG | -2408 | The input parameter length exceeds the maximum. |
DCRPCER_REPLY_TOO_BIG | -2409 | The length of the returned response exceeds the area provided by the CUP. |
DCRPCER_NO_SUCH_SERVICE_GROUP | -2410 | An undefined service group name was specified. Alternatively, a service request was sent to a user server that receives requests from socket (receive_from=socket is specified in the user service definition). Alternatively, the SPP requested to provide a service was not started when N was specified for DCCLTONLYTHISNODE of the client environment definition. |
DCRPCER_NO_SUCH_SERVICE | -2411 | An undefined service name is specified. |
DCRPCER_SERVICE_CLOSED | -2412 | The service group containing the specified service is shut down. |
DCRPCER_SERVICE_TERMINATING | -2413 | The specified service is terminating. |
DCRPCER_SERVICE_NOT_UP | -2414 | The SPP requested to provide a service was not started when Y was specified for DCCLTONLYTHISNODE of the client environment definition. Alternatively, when 0 is specified for DCWATCHTIM in the client environment definition, the SPP terminated abnormally before completing the processing. |
DCRPCER_OLTF_NOT_UP | -2415 | OpenTP1 is not running on the node that has the specified service. |
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 | The length of the response returned to OpenTP1 from the service function is not in the range from 1 to the value of DCRPC_MAX_MESSAGE_SIZE#. |
DCRPCER_OLTF_INITIALIZING | -2420 | OpenTP1 is starting on the node to which the service request was sent. |
DCRPCER_TRNCHK | -2427 | The version of OpenTP1 on the node used for load balancing is too old to execute the inter-node load balancing facility. This value is returned only when a service request has been issued to the SPPs using the inter-node load balancing facility. |
DCRPCER_TESTMODE | -2466 | A service request was issued to an SPP for which test_mode=no was specified in the user service definition. |
DCRPCER_SECCHK | -2470 | The service-requested SPP is protected by the security facility. The UAP that called the dc_rpc_call_to_s function is not authorized to access the server UAP. |
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 if the specification is omitted, DCRPCER_TIMED_OUT or DCRPCER_SERVICE_NOT_UP is returned as the return value. |
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. |
Status of SPP | Value of DCCLTONLYTHISNODE in the client environment definition | ||
---|---|---|---|
Specified node | Other node | N or omitted | Y |
When the SPPs in these nodes have equal loads | The job is assigned to the SPP in the specified node. | The job is assigned to the SPP in the specified node. | |
When the SPP in the specified node has a heavier load than the SPP in the other node | The job is assigned to the SPP in the other node. | The job is assigned to the SPP in the specified node. | |
Active | Shut down (acceptable) | Which SPP is assigned the job depends on the load level of the SPP in the specified node. When the SPP in the specified node does not have a heavy load, the job is assigned to the SPP in the specified node. If the specified node does have a heavy load, the job is assigned to the SPP in the other node. | The job is assigned to the SPP in the specified node. |
Shut down (acceptable) | Active | Which SPP is assigned the job depends on the load level of the SPP in the other node. When the SPP in the other node does not have a heavy load, the job is assigned to the SPP in the other node. If the other node does have a heavy load, the job is assigned to the SPP in the specified node. | The job is assigned to the SPP in the specified node. |
Shut down (unacceptable) | Active | The job is assigned to the SPP in the other node. | The function returns a DCRPCER_SERVICE_CLOSED error. |
Inactive | Active | The job is assigned to the SPP in the other node. | The function returns a DCRPCER_SERVICE_NOT_UP error. |
Inactive | Inactive | The function returns a DCRPCER_NO_SUCH_SERVICE_GROUP error. | The function returns a DCRPCER_SERVICE_NOT_UP error. |
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.