Generating Multiple Interface Objects

#### Search Results

Search

# Generating Multiple Interface Objects

You can generate single or multiple interface objects in either online or batch mode by using the function the Interface Object Mass Generation or the direct command `SYSRPC SGMASS`. Either method will invoke a window that indicates the send and receive lengths required by the specified subprogram(s).

Using the command or function, field attributes will be generated as described in Specifying Parameters in the section Generating Single Interface Objects with Parameter Specification.

You generate interface object from subprograms.

This section contains information on:

- Using the Function Interface Object Mass Generation

- Using the SYSRPC SGMASS Direct Command

- Name Specification and Compression

## Using the Function Interface Object Mass Generation

This section provides instructions for generating single or multiple interface objects by using the Interface Object Mass Generation function.

To perform the Interface Object Mass Generation function

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

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

   An SYSRPC - Input for Interface Object Mass Generation dialog box similar to the example below appears:

2. In the Name text box, enter the name of the interface object to be generated or specify a range of names. The text box is preset to asterisk (*), indicating all subprograms. For valid entries, see Name in Name Specification and Compression.

   The name(s) of the interface object must be identical to the name(s) of the remote `CALLNAT` program(s).

   Important
   If you do not specify a name, with few exceptions (see below), all subprograms in the current library will be converted to interface objects.

   If required, in the Source library text box, enter the name of the library that contains the subprogram(s) from which you want to generate the interface object(s). The text box is preset to the name of the current library.

   Target library is a read-only text box that contains the name of the current library into which the interface objects are generated.

   DBID, FNR are non-modifiable 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 - Interface Object Generation 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:

   - Generation Criteria:
     The criteria based on which the interface objects were generated: a single object name or a range of names (here: `RPC*`) and the compression (here: `1`).

   - Generation Results (sizes in bytes):
     The number of objects selected for the interface object generation.

     The maximum buffer sizes all generated interface objects require for sending and receiving data from the client.

   If the generation of an interface object fails, a message at the bottom of the page indicates this error.

   The Details page contains a list of all generated interface objects 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 from which the interface object was generated (here: `N` for 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 generation of an interface object in the Message column.

   If the generation of the interface object fails, an error message is displayed next to the objects affected (here: `RPCCALL2`).

## Using the SYSRPC SGMASS Direct Command

You can enter the `SYSRPC SGMASS` direct command in the Command line for generating interface objects online.

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

- Syntax of SYSRPC SGMASS

### Syntax of SYSRPC SGMASS

The syntax that applies to the `SYSRPC SGMASS` direct command is illustrated in the diagram below:

`SYSRPC SGMASS` [name] [compression]

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

## Name Specification and Compression

You can specify the objects (subprograms) to be selected for interface object generation and the type of compression to be used.

- Name

- Compression

### Name

You can specify an object name or a range of names. The specification of an object name or a range of names is optional.

| Warning: If you do not specify an object name or a range of names, with few exceptions (see below), all subprograms in the current library will be converted to interface objects.

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.

#### Exceptions to Names

In the Natural system library SYSRPC, `SYSRPC SGMASS` exempts from interface object generation all subprograms with names that start with any of the following prefixes: RDS, RPC, NAT, NAD or NSC.

In user libraries, `SYSRPC SGMASS` exempts from interface object generation the subprogram NATCLTGS.

### 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 Generation
- Using the SYSRPC SGMASS Direct Command
- Name Specification and Compression