Calculating Size Requirements

The SYSRPC CSMASS direct command is used to calculate the buffer size RPC calls without intreface objects 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.

SYSRPC CSMASS can be used in online or batch mode.

This section contains information on:


Using the SYSRPC CSMASS Direct Command

You can enter the command SYSRPC CSMASS at any Natural command prompt for calculating size requirements online.

The section below contains information on:

Syntax of SYSRPC CSMASS

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.

SYSRPC CSMASS Report

The SYSRPC CSMASS direct command produces a report that indicates the send and receive length requirements of the subprograms (objects) specified with the command as shown in the following example:

Page       1                                               2018-01-17 15:54:12

    SYSRPC - Calculation of Buffer Sizes for RPC Without Interface Objects


Calculation Criteria:

    Object name or range: RPC*
             Compression: 1


Calculation Results (sizes in bytes):

 Number of objects found:       8
     Maximum send length:  200228
  Maximum receive length: 1024192


Object     Type      Send Length   Receive Length   Message
--------   ----   --------------   --------------   --------------
RPCCALL1   N                 209              202
RPCCALL2   N                 219              240   Compression=2
RPCCALL3   N                 204              193
MORE

The report is organized in three 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.

  • Object List:
    The name and type (here: N for type subprogram) of each object selected for the calculation. The buffer sizes each object requires for sending (Send Length) and receiving (Receive Length) data from the client. A possible comment on each object calculation in the Message column. In the example above, Compression=2 indicates that object RPCCALL2 was not calculated with Compression 1 as requested in the command. The object list is sorted in alphabetical order of object names.

If the MORE prompt appears, choose ENTER to scroll to the end of the report.

If the size calculation fails for single or multiple objects, the report shows the number of objects affected and appropriate error messages.

Name Specification and Compression

You can specify the objects (subprograms or PDAs) 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 or PDAs 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 or PDAs.

This is the default setting.

value A subprogram or a PDA with a name equal to value.
value* All subprograms or PDAs with names that start with value.
value< All subprograms or PDAs with names less than or equal to value
value> All subprograms or PDAs 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.