Section 6 Definitions of Server Functions
Rev. 1.01 Mar. 17, 2008 Page 71 of 128
REJ10J1822-0101
(2) When the input/output keyword selected for ARY is OUT
In this case, a parameter specification that includes ARY must be followed by two definitions of
COUNT to indicate the number of elements in the array.
<parameter including ARY>,<definition of first COUNT>,
<definition of second COUNT>
The first COUNT is the COUNT keyword followed by an expression that specifies the number of
elements in the array for storage of output by the client.
The second COUNT is the COUNT keyword followed by an expression that specifies the number
of elements in the array to be actually output by the server. This value must be less than or equal
to that specified for the first COUNT.
RPCGEN creates client-stub code that makes an RPC call after setting the size of an input IOVEC
structure by using an expression of the kind specified in figure 6.4. RPCGEN also creates server-
stub code that makes a server-function call before setting the size of an output IOVEC structure by
using an expression of the kind specified in figure 6.5. This must be taken into account in defining
the first and second COUNT. For example, an expression for the first COUNT must not contain
any variables that hold the return value of a function. Figures 6.4 and 6.5 show the code for
example 8 (without SVR_AUTH) of the examples introduced following the figures.