This document presents the API RPC-CNTX to provide an RPC context from the Natural client side.
The API RPC-CNTX can be used for providing a context for RPC calls as it is done in test programs generated by the webMethods EntireX Natural Wrapper.
RPC-CNTX combines the functionality of several APIs and is
available in library SYSTEM
. There is no need for extra
preparations such as setting a STEPLIB or to copy APIs from SYSEXT to user
libraries.
To make use of RPC-CNTX
Specify a DEFINE
DATA
statement
where level 01
is defined by 01
RPC-CNTX-AREA
, and specify the following parameters on level
02
:
Parameter | Format | I/O | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FUNCTION | A2 | I |
|
||||||||||||
BROKERID | A dynamic | I/O | Specify the broker
name.
See the profile parameter |
||||||||||||
CLASS | A32 | I | Specify the server class. For Natural RPC servers, this
is RPC . See the keyword subparameter SRVNAME of the RPC profile
parameter.
|
||||||||||||
SERVER | A32 | I/O | Specify the server name. See the
profile parameter SRVNAME |
||||||||||||
SERVICE | A32 | I | Specify the type of RPC. For Natural RPC servers, this
is CALLNAT .
|
||||||||||||
COMPRESSLEVEL | A1 | I/O | Compression level requires API version 7. | ||||||||||||
RESERVED | I1 | I/O | Reserved for future use. | ||||||||||||
RPC-LIBRARY | A08 | I | |||||||||||||
RPC-RELIABLE-STATE | N1 | I/O |
|
||||||||||||
NAT-LOGON | A11 | I/O | |||||||||||||
EXX-USERID | A32 | I | |||||||||||||
EXX-PASSWORD | A32 | I | |||||||||||||
RPC-USERID | A32 | I | |||||||||||||
RPC-PASSWORD | A32 | I | |||||||||||||
ERR-CODE | I4 | O | The origin of some error code can be detected by the
following identifiers:
|
||||||||||||
ERR-TEXT | A dynamic | O |
Note:
The most important function codes are 'SL'
and
'LF'
. Function code 'SL'
is a combination of setting
the RPC context ('SC'
) and a logon to EntireX Broker
('LO')
.
In the calling program on the client side, specify the following statement:
CALLNAT 'RPC-CNTX' RPC-CNTX-AREA
For further information refer to Syntax Description in CALLNAT in the Statements documentation.
The setting of the RPC context is processed as follows:
Set the credentials for RPC server by specifying
RPC-USERID
and RPC-PASSWORD
(API USR1071N).
Set the mode for reliable RPC by specifying
RPC-RELIABLE-STATE
(API USR6304N).
Set the data for the RPC default server including the
logon option with a
specification for BROKERID
, SERVER
and
NAT-LOGON
(API USR2007N).
Change the library name on the RPC server for the logon by
specifying RPC-LIBRARY
(API USR4008N). If the name is left blank,
the API is not called.
Set parameters for EntireX COMPRESSLEVEL
by using
API USR4009N. If no values are specified, the API is not called.
For logging on to the EntireX Broker, specify
BROKERID
, EXX-USERID
, and EXX-PASSWORD
,
which are then passed to USR2071N.
After you have finished your work with the RPC connection, you need
to log off from the EntireX Broker using RPC-CNTX with function code
'LF'
.