Calculating Size Requirements

#### Search Results

Search

# 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 interface objects, even though sizes are already calculated when the interface objects are generated.

Size calculations are performed with either the Interface Object Mass Calculation function or the `SYSRPC CSMASS` direct command 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 Function Interface Object Mass Calculation

- Using the SYSRPC CSMASS Direct Command

- Name Specification for Size Calculation and Compression

## Using the Function Interface Object Mass Calculation

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

To perform Interface Object Mass Calculation

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

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

   An SYSRPC - Input for Interface Object 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 RPC (Remote Procedure Call) 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:

   - Calculation Criteria:
     The criteria based on which the calculation was made: a single object name or a range of names (here: `RPC*`) and the compression (here: `1`).

   - Calculation Results (sizes in bytes):
     The number of objects selected for the size calculation. The maximum buffer sizes all selected objects require for sending and receiving data from the client.

   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:

   - the type of object used for the calculation (here: `N` for type subprogram) in the Type column,

   - the buffer sizes each object requires for sending (Send Length) and receiving (Receive Length) data from the client,

   - and a possible comment on each object calculation in the Message column.

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

## Using the SYSRPC CSMASS Direct Command

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

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

The syntax that applies to the `SYSRPC CSMASS` direct command 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.

## Name Specification for Size Calculation and Compression

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

- Name

- Compression

### 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 interface object generation is `1`.

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

### On this page

- Using the Function Interface Object Mass Calculation
- Using the SYSRPC CSMASS Direct Command
- Name Specification for Size Calculation and Compression