gtpa2m2u | Application Programming |
Figure 33 shows how an RPC interface is created and used in the RPC
client/server environment.
- Note:
- The directory server is not needed if string bindings are used that contain
the complete binding information.
Figure 33. Remote Procedure Call Overview for Client and Server Platforms
To create an RPC client/server application, do the following:
- Generate a universal unique identifier (UUID) for the new RPC interface by
using the UUID Generator Utility on an OS/390 system.
- Create an Interface Definition Language (IDL) file that includes the UUID
and the remote procedures with their input and output parameters.
- Compile the IDL file with an IDL compiler to generate header files and
stub files for client and server applications on an OS/390 system.
- Include the header file in the server application. Compile and link
the server stub file and the server application on the server platform (this
would be where you compile and link all your TPF code).
- Include the header file in the client application. Compile and link
the client stub file and the client application on the client platform.
- Load the server code to your TPF 4.1 system. RPC servers are
processor and subsystem unique.
- Cycle the TPF 4.1 system to 1052 state or higher.
- To increase thread resources, change the thread parameters in keypoint A
(CTKA) by entering the ZCTKA ALTER command with the MTHD and TSTK parameters
specified. Restart your system by entering the ZRIPL command.
- Define an Internet daemon (INETD) entry for the new server by entering the
ZINET ADD command with the S, MODEL-RPC, and PGM parameters specified.
- Cycle the TPF 4.1 system to CRAS state or higher.
- Verify that TCP/IP support is active in the TPF 4.1 system and that
required offload devices or Internet Protocol (IP) routers are available and
active. Enter the ZCLAW DISPLAY command with the ACTIVE parameter
specified to check the active CLAW workstations, and the ZTTCP DISPLAY command
with the ACTIVE parameter specified to display all active IP routers.
- Start the server using the INETD by entering the ZINET START command with
the S parameter specified.
Clients can now access remote procedures from any client platform.
See TPF Operations for more information about the
ZCLAW DISPLAY, ZCTKA ALTER, ZINET ADD, ZINET START, ZRIPL, and ZTTCP DISPLAY
commands.