z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


RPCGEN command

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

Purpose

Use the RPCGEN command to generate the code to implement the RPC protocol.

Format

Read syntax diagramSkip visual syntax diagram
>>-RPCGEN--infile----------------------------------------------><

Read syntax diagramSkip visual syntax diagram
>>-+-RPCGEN-+--+--------------+--+--------+--------------------><
   +- -c----+  '- -o--outfile-'  '-infile-'   
   +- -h----+                                 
   +- -l----+                                 
   '- -m----'                                 

Read syntax diagramSkip visual syntax diagram
   .------------------------.                                 
   V                        |                                 
>>---RPCGEN-- -s--transport-+--+--------------+--+--------+----><
                               '- -o--outfile-'  '-infile-'   

Parameters

-c
Compiles into XDR routines.
-h
Compiles into C data definitions (a header file).
-l
Compiles into client-side stubs.
-m
Compiles into server-side stubs without generating a main routine. This option is useful for callback routines and for writing a main routine for initialization.
-o outfile
Specifies the name of the output data set. If none is specified, standard output is used for -c, -h, -l, -m, and -s modes.
infile
Specifies the name of the input data set written in the RPC language. The default is the data specified by the SYSIN DD statement.
-s transport
Compiles into server-side stubs, using the given transport. TCP and UDP are the supported transports. You can invoke this option more than once to compile a server that serves multiple transports. By default, RPCGEN creates server stubs that support both TCP and UDP.

RPCGEN is a tool that generates C code to implement an RPC protocol. The input to RPCGEN is a language similar to C, known as RPC language.

RPCGEN infile is normally used when you want to generate all four of the following output data sets. For example:
  • If the infile is named proto.x, RPCGEN generates:
    • A header file called PROTO.H
    • XDR routines called PROTOX.C
    • Server-side stubs called PROTOS.C
    • Client-side stubs called PROTOC.C
  • If the infile is named USERA.RPC.SOURCE(PROTO), RPCGEN generates:
    • A header file called USERA.RPC.H(PROTO)
    • XDR routines called USERA.RPC.C(PROTOX)
    • Server-side stubs called USERA.RPC.C(PROTOS)
    • Client-side stubs called USERA.RPC.C(PROTOC)
RPCGEN obtains the file names for the C compiler for preprocessing input from the CCRPCGEN CLIST, which must be customized similar to the C installation procedure. For installation using the C/C++ compiler, the following would be an example of the values for the statements in CCRPCGEN that are used by RPCGEN:
SET CHD      = &STR(CBC)         /* PREFIX FOR SYSTEM FILES       */
SET CVER     = &STR(   )         /* VERSION OF COMPILER           */
SET COMPL    = &STR(SCCNCMP)     /* C COMPILER MODULES            */
SET EDCMSGS  = &STR(SCBCDMSG)    /* C COMPILER MESSAGES           */
SET LANG     = &STR(CBCLMSGS)    /* MESSAGE LANGUAGE              */
SET SCEEHDRS = &STR(SCEEH)       /* C SYSTEM HEADER FILES         */
SET CMOD     = &STR(CCNDRVR)     /* C COMPILER EXECUTABLE MODULE  */
SET WORKDA   = &STR(SYSDA)       /* UNIT TYPE FOR WORK FILES      */
SET WRKSPC   = &STR(1,1)         /* CYLS ALLOCATED FOR WORK FILES */
The CCRPGEN clist must be in the SYSPROC concatenation.
Notes:
  1. A temporary file called PROTO.EXPANDED is created by the RPCGEN command. During normal operation, this file is also subsequently erased by the RPCGEN command.
  2. The code generated by RPCGEN is not suitable for input to a C++ compiler.

For more information about the RPCGEN command, see the Sun Microsystems publication, Network Programming.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014