Developing an ONC RPC application for CICS ONC RPC
ONC RPC applications are always developed as client/server pairs.
The process described in this section takes account of this, but concentrates on the server, because CICS® ONC RPC affects this and not the client. For details of the client development process, read the documentation of the ONC RPC system running on the client machine.
The process of developing all the material needed for an ONC RPC application using CICS ONC RPC is summarized in Figure 1 , which showed the process for ONC RPC without CICS ONC RPC.

The figure shows the development process when RPCGEN is used to create source text from the interface definition in the RPCL program. If you do not use RPCGEN, you must supply some of its output - XDR routines and header files - yourself. The development of the CICS program to service client requests is not shown.
- Decide what data is to be sent from client to server and what is to be returned. If the data structures the client uses are not simple, you might choose to use RPCGEN to help with managing the data. If you choose to use RPCGEN, some of its output is useful for writing the user-replaceable programs for CICS ONC RPC.
- Decide the format of the communication area to be used by the CICS program. If the client is to use an existing CICS program, the format is already decided.
-
Write the XDR routines. If the translations you need can be done
by an XDR library function supported by the connection manager (see
Table 1
), you do not need to write
an XDR routine. If you used RPCGEN, it has generated source for XDR
routines. In any other case you must write the XDR routines
yourself.
XDR routines must be written in C.
- Write the converter. If you used RPCGEN, and you are going to write your converter in C, the header files produced by RPCGEN describe the data structures that Decode receives and Encode returns. The format of the CICS program communication area is also used by Decode and Encode.
- Write the resource checker, if required. You may want to write your own resource checker to validate incoming client requests. Security for ONC RPC tells you about this and other security facilities available for use with CICS ONC RPC. Writing the resource checker gives you details on writing a resource checker.
- Compile and link the user-replaceable programs. If you used RPCGEN, the header files are needed for the compilation of the XDR routines and the converter if it is in C.
- Define the server application set to CICS. This means defining programs for the CICS program, any XDR routines that are not just XDR library functions, and the converter. One or more alias transaction definitions may also be required, see Defining CICS(r) ONC RPC resources to CICS(r) .
- Use the connection manager to define a 4-tuple and save it in the CICS ONC RPC data set. The definition specifies the CICS program, XDR routines, and converter, as described in Defining the attributes of a 4-tuple.