Version 6.3.8 for Windows
 —  Tools and Utilities  —

Calculating Size Requirements

You can calculate the buffer size (in bytes) stubless RPC calls require for sending data from the client to the server or vice versa. The indication of the size helps you configure the middleware layer used; for example, the Broker attribute file when EntireX Broker is used. If desired, you can also perform size calculations for stub subprograms (interface objects), even though sizes are already calculated when generating the stub subprograms.

Size calculations are performed with either the Stub Mass Calculation function or the direct command SYSRPC CSMASS whereby the direct command can be used in online or batch mode. Either method will invoke a window that indicates the send and receive lengths required by the specified subprogram(s).

This section contains information on:


Using the Stub Mass Calculation Function

This section provides instructions for calculating size requirements by using the Stub Mass Calculation function.

Start of instruction set To perform Stub Mass Calculation

  1. In the SYSRPC - Remote Procedure Call window, from the Tools menu, choose Stub Mass Calculation.

    Or:
    In the SYSRPC - Remote Procedure Call window, press CTRL+F5.

    An SYSRPC - Input for Stub Mass Calculation dialog box similar to the example below appears:

  2. In the Name text box, enter the name of the subprogram for which to calculate the size or specify a range of names. The text box is preset to an asterisk (*) for all subprograms. For valid names, see Name in Specification and Compression.

    If required, in the Source Library text box, enter the name of the library that contains the subprograms specified. The text box is preset to the name of the current library.

    The Target Library text box does not apply to the mass calculation function.

    DBID, FNR are read-only text boxes that display the database ID (DBID), the file number (FNR) and the type of Natural file (FNAT = system, FUSER = user) for the source and target libraries entered.

    From the Compression drop-down list box, select compression type 0, 1 or 2 (default is 1); see Using Compression described in Operating a Natural RPC Environment in the Natural Remote Procedure Call (RPC) documentation.

  3. Choose OK.

    The SYSRPC - Calculation of Buffer Sizes for Stubless RPC in Library window appears for the library specified (here: SAGTEST) with the tabbed pages Summary and Details.

    The Summary page contains a report that indicates the send and receive length requirements of the subprograms (objects) selected as shown in the following example:

    The report is organized in two sections, which contain the following information:

    If the size calculation fails, a message at the bottom of the page indicates this error.

    The Details page contains a list of all objects selected for the calculation similar to the example shown below:

    The list is sorted in alphabetical order of object names (Name column) and contains information on the following:

    If the size calculation fails, an error message is displayed next to the objects affected (here: RPCCALL2).

Top of page

Using the SYSRPC CSMASS Command

You can enter the command SYSRPC CSMASS in the Command line for calculating size requirements online.

The report produced by the command corresponds to the report described for the Stub Mass Calculation function.

The syntax that applies to the command SYSRPC CSMASS is illustrated in the diagram below:

SYSRPC CSMASS [name] [compression]

The syntactical items name and compression are explained in the section Name Specification and Compression.

Top of page

Name Specification and Compression

You can specify the objects (subprograms) to be selected for size calculation and the type of compression to be used:

Name

You can specify an object name or a range of names. If you do not specify a name or a range of names, the size of all subprograms contained in the current library will be calculated.

Valid name specifications are described below where value is any combination of one or more alphanumeric characters:

Input Objects Selected
*

All subprograms.

This is the default setting.

value A subprogram with a name equal to value.
value* All subprograms with names that start with value.
value< All subprograms with names less than or equal to value
value> All subprograms with names greater than or equal to value.

Compression

You can specify any of the following compression types: 0, 1, 2. The specification of compression is optional. The default type used for stub generation is 1.

See also Using Compression described in Operating a Natural RPC Environment in the Natural Remote Procedure Call (RPC) documentation.

Top of page