OpenTP1 Version 7 Programming Guide

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

2.1.17 RPC with a communication destination specified

When you use the function dc_rpc_call() to request a service, the client UAP need not be aware of the location of the requested service. This is because the name service provided by OpenTP1 manages this information.

In contrast, by using the function dc_rpc_call_to(), you can request a service from a specific service request destination. You cannot specify a domain qualifier in the function dc_rpc_call_to() for requesting a service. In all other respects, the function dc_rpc_call_to() is the same as the function dc_rpc_call().

TP1/Extension 1 must be installed before you can use this function. Note that operation will be unpredictable if you run the function while TP1/Extension 1 is not installed. You can use only a UAP created in C under the control of TP1/Server to call this function. You cannot call it using a UAP created in COBOL.

To designate a service request destination, you must specify one of the following in the arguments of the function dc_rpc_call_to().

  1. Host name
    Specify a host name that can be mapped to an IP address with the /etc/hosts file or DNS to designate the request destination node.
    In this case, the value specified in the name_port operand of the system common definition on the service request destination and the value specified in the name_port operand on the service request source (the side that called the function dc_rpc_call_to()) must be the same.
  2. Node identifier
    Specify the node identifier specified in the node_id operand of the system common definition to designate the destination OpenTP1 node for the service request.
    The host name of the destination OpenTP1 node corresponding to the specified node identifier must exist within the global domain.#
  3. Host name and port number
    Specify the service request destination by specifying one of the following values.
    • Host name that can be mapped to an IP address with the /etc/hosts file or DNS.
    • Port number of the name service specified in the name_port operand of the system common definition of the OpenTP1 system on the host specified above.
    In this case, the value specified in the name_port operand of the service request destination and the value specified in the name_port operand of the service request source need not be the same.

#
Here, global domain refers to one of the following sets of node names:
When N is specified for the name_domain_file_use operand of the system common definition:
A set of node names specified by the all_node and all_node_ex operands of the system common definition
When Y is specified for the name_domain_file_use operand of the system common definition:
A set of node names specified in the domain definition file. Note that the domain definition file is stored at the following location:
  • all_node domain definition file
    Under the $DCCONFPATH/dcnamnd directory
  • all_node_ex domain definition file
    Under the $DCCONFPATH/dcnamndex directory

The figure below shows an example of communication using the function dc_rpc_call_to() in which a node identifier is specified for designating the service request destination.

Figure 2-16 Example of communication using the function dc_rpc_call_to()

[Figure]