The EntireX z/VSE CICS® RPC Server allows standard RPC clients to communicate with RPC servers on the operating system z/VSE under CICS. It supports the programming language COBOL. This document covers the following topics:
The following elements are used for setting up the CICS RPC Server:
defines a setup of the CICS RPC Server that is persistent over CICS restarts
is defined with parameters of the ERXMAIN
Macro; see column 1 in the table under Configuring the RPC Server
contains the following important settings:
creates an ERXMAIN
Control Block, a persistent setup of the CICS RPC Server
needs to be assembled to define a setup
is defined in Assembler program EMAINGEN
(in sublibrary EXP960) - use this for assembling; see Build the ERXMAIN Control Block under Installing EntireX RPC Servers under CICS
provides commands (see column 2 in the table below) to vary most of the permanently defined parameters in the ERXMAIN
Control Block currently in use.
All modifications are lost if CICS is restarted. Use ERXMAIN
Macro for permanent modifications
allows you to try out new setups of the CICS RPC Server easily without the need to reassemble the ERXMAIN
Control Block.
supports
starting
stopping
pinging
monitoring
activating trace
of the CICS RPC Server. See RPC Online Maintenance Facility.
The following rules apply for the ERXMAIN
Macro syntax (column 1 in table below):
keywords are given in uppercase
there are no abbreviations for keywords
The following rules apply for the RPC Online Maintenance Facility commands (column 2 in table below):
Underscored letters in a command indicate the minimum number of letters that can be used for abbreviation.
For example, in brokerid=localhost
, brok
is the
minimum number of letters that can be used as an abbreviation, i.e. the commands
brokerid=localhost
and brok=localhost
are equivalents.
ERXMAIN Macro Syntax | RPC Online Maintenance Facility Commands | Default | Values | Req/ Opt |
|||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BKRN |
brokerid |
ETB001 |
Broker ID used by the server. See Using the Broker ID in Applications.
Example: |
R | |||||||||||||||||||
CLZN |
class |
RPC |
Server class part of the server address used by the
server. The server address must be defined as a service in the broker attribute file (see Service-specific Attributes under Broker Attributes).
Case-sensitive, up to 32 characters. Corresponds to CLASS attribute of the broker attribute file.
Example: |
R | |||||||||||||||||||
SRVN |
servername |
SRV1 |
Server name part of the server address used by the server.
The server address must be defined as a service in the broker attribute file.
See Service-specific Attributes under Broker Attributes.
Case-sensitive, up to 32 characters.
Corresponds to SERVER of the broker attribute file.
Example: |
R | |||||||||||||||||||
SVCN |
service |
CALLNAT |
Service part of the server address used by the server.
The server address must be defined as a service in the broker attribute file.
See Service-specific Attributes under Broker Attributes.
Case-sensitive, up to 32 characters.
Corresponds to SERVICE attribute of the broker attribute file.
Example: |
R | |||||||||||||||||||
CODE |
codepage |
no codepage transferred | Depending on the internationalization approach, the codepage (locale string)
where incoming data is provided to the COBOL server. Conversely, the COBOL server must provide outgoing data in the
given codepage, otherwise unpredictable results occur. See What is the Best Internationalization Approach to use? under Internationalization with EntireX for information
on which internationalization approach requires a codepage (locale string).
By default, no codepage is transferred to the broker. For the most popular internationalization approach, ICU Conversion, the correct codepage (locale string) must be provided. This means it must:
Example: |
O | |||||||||||||||||||
COMP |
compresslevel |
N |
Enforce compression when data is transferred between
broker and server. See Data Compression in EntireX Broker.
Example: |
O | |||||||||||||||||||
CYCL |
restartcycles |
15 |
Number of restart attempts if the broker is not
available. This can be used to keep the CICS RPC Server running while
the broker is down for a short time. A restart cycle will be
repeated at an interval which is calculated as follows:
When the number of cycles is reached and a connection to the broker is not possible, the RPC server stops. Example: |
O | |||||||||||||||||||
DPLY |
deployment |
NO |
Activates the deployment service, see Deployment Service. Required to
use the Server Mapping Deployment Wizard. See Server Mapping Deployment Wizard in the EntireX Workbench documentation.
Example: |
O | |||||||||||||||||||
ENCR |
encryptionlevel |
0 |
Enforce encryption when data is transferred between
client and server. Requires EntireX Security. See ENCRYPTION-LEVEL under Broker ACI Fields.
Example: |
O | |||||||||||||||||||
ENDW |
endworker |
TIMEOUT |
This parameter is forced to value Example: |
O | |||||||||||||||||||
MINW |
minworker |
1 |
Minimum limit of tasks active in parallel.
See also Example: |
O | |||||||||||||||||||
MAXW |
maxworker |
10 |
Upper limit of tasks active in parallel.
Example: |
O | |||||||||||||||||||
ETBL |
etblnk |
BKIMC |
Define the broker stub to be used. See Administration of Broker Stubs under z/VSE for available stubs.
Example: |
O | |||||||||||||||||||
EXIT |
n/a | At startup, the CICS RPC Server will call the user exit to synchronize its version.
If successful, the CICS RPC Server will continue and call the user exit for the implemented events.
See User Exit COBUEX02 .
|
O | ||||||||||||||||||||
IMPS |
impersonation |
NO |
|
O | |||||||||||||||||||
LOGN |
logon |
YES |
Execute broker functions LOGON/LOGOFF in worker
threads. Must match the setting of the broker attribute
AUTOLOGON .
Reliable RPC requires logon set to YES .
See Reliable RPC.
Example: |
O | |||||||||||||||||||
n/a |
mapname |
Alias for command memory .
|
O | ||||||||||||||||||||
n/a |
memory |
Command to load an ERXMAIN Control Block.
See Modifying Parameters of the RPC Server.
|
O | ||||||||||||||||||||
OPTS |
runoption |
0 |
This parameter is for special purposes. It provides the CICS RPC Server with additional information.
The runoptions are normally set to meet the platform's requirements.
Set this parameter only if a support representive provides you with an option and asks you to do so.
Syntax: Example: |
O | |||||||||||||||||||
PSWD |
password |
Password for broker logon. Case-sensitive, up to 32
characters. For more information see broker ACI control block field
PASSWORD .
Example: |
O | ||||||||||||||||||||
PRELOAD |
preload |
YES |
Enable to call CICS RPC Server with AMODE=24
|
O | |||||||||||||||||||
REPL |
replicatename |
ESRV |
CICS transaction ID (uppercase, up to 4 characters) assigned to worker tasks
and as default for user tasks if Impersonation is set. In the START-USER event of the user exit
(see User Exit COBUEX02 ) the CICS transaction ID for user tasks
can be overridden. See also Inside the RPC Server.
|
O | |||||||||||||||||||
SIZE |
n/a | 32768 |
Size in bytes to hold work memory for worker tasks and impersonated user tasks if impersonation is used.
Each task (worker and user) requires the same amount of memory.
The following rules apply when calculating the ERXMAIN macro parameter MAXW :
This means:
|
O | |||||||||||||||||||
SMH |
smhport |
0 |
The port where the server listens for commands from
the System Management Hub (SMH). If this port is 0 (default), no port is used and
management by the SMH is disabled.
See SMH Listener Service for more information. Example: |
O | |||||||||||||||||||
SVM |
svmfile |
Usage and location of server-side mapping files.
See Server-side Mapping Files in the RPC Server.
If no SVM parameter is given, the RPC server tries to open the server-side mapping container,
using CICS file with name ERXSVM .
If this CICS file is not available, no server-side mapping files are used.
If you use server-side mapping files, the server-side mapping container must be installed and configured;
see Step 1: Define a Server-side Mapping Container - VSAMDEF.J (Optional) under Installing the z/VSE EntireX RPC Servers.
There are also client-side mapping files that do not require configuration here; see Server Mapping Files for COBOL.
Syntax:
Example: See also Usage of Server Mapping Files. |
O | ||||||||||||||||||||
TOUT |
timeout |
600 |
Timeout in seconds,
used by the server to wait for broker requests. See broker ACI control block field
WAIT for more information. Also influences restartcycles .
See worker model Example: |
O | |||||||||||||||||||
TRC1 |
tracedestination |
CSSL |
Name of the destination for trace output. A valid CICS transient data queue. | O | |||||||||||||||||||
TRLV |
tracelevel |
0 |
Trace level for the server. See also Activating Tracing for the RPC Server.
Syntax:
Example: |
O | |||||||||||||||||||
USER |
userid |
ERXSRV1 |
Used to identify the server to the broker.
See broker ACI control block field USER-ID .
Case-sensitive, up to 32 characters.
Example: |
R |
The IDL library and IDL program
names that come from RPC client are used to locate the RPC server.
See library-definition
and
program-definition
.
This two-level concept (library and program) has to be mapped to the CICS RPC Server environment.
The approach used to derive the CICS program name for the RPC server depends on whether server mapping is used or not. See Usage of Server Mapping Files for an introduction.
If the RPC client sends a client-side type of server mapping with the RPC request, this server mapping is used first.
If no server mapping is available from step 1 above, and if server-side type of server mapping is used, the IDL library and IDL program names are used to form a key to locate the server mapping in the server-side mapping container. If a server mapping is found, this is then used.
If a server mapping is available from step 1 or 2 above, the CICS program name of the RPC server is derived from this mapping. In this case the IDL program name can be different to the CICS program name if it is renamed during wrapping process (see Customize Automatically Generated Server Names) or during the extraction process in the COBOL Mapping Editor.
If no server mapping is used at all, the IDL program name is used as the CICS program name of the RPC server (the IDL library name is ignored).
To use the CICS RPC Server with COBOL
Make sure that all CICS programs called as RPC servers
use an interface type supported by the CICS RPC Server for target language COBOL; see Supported Interface Types.
can be called with an EXEC CICS LINK PROGRAM
are accessible through the CICS RPL chain or accessible remotely using CICS DPL
Configure the ERXMAIN
macro parameter SVM
depending on whether server-side mapping files are used or not. See also Usage of Server Mapping Files.
See also Scenario I: Calling an Existing COBOL Server or Scenario II: Writing a New COBOL Server.
The CICS RPC Server provides a user exit COBUEX02
to influence/control the RPC logic.
This section covers the following topics:
The user exit is called on the following events:
START-WORKER event before a CICS worker task is started. This allows you to programmatically set the CICS transaction ID. You can terminate
an RPC request by specifying an ERROR-CODE and optional ERROR-TEXT .
|
|
START-USER event. Before an impersonated CICS transaction (worker task) is started, the user exit may change the user ID and CICS transaction
ID of the new impersonated worker. See Impersonation. You can terminate an RPC request by specifying an ERROR-CODE and optional ERROR-TEXT .
|
|
CALL-START event. The RPC request (payload data from the RPC client to the RPC server) may be inspected and modified. You can terminate
an RPC request by specifying ERROR-CODE and optional ERROR-TEXT .
|
|
CALL-END event. The RPC reply (payload data from the RPC server to the RPC client) may be inspected and modified. If an ERROR-CODE and optional ERROR-TEXT is given in the API, this error is returned to the RPC client instead of the payload.
|
The Developer's Kit RPC source data set EXP960.SRCE of the EntireX CICS installation
provides the user exit skeleton COBUEX02
for COBOL.
Copy this skeleton so you have your own user exit source for modifications.
Accordingly, a COBOL copybook COBUEX02
is provided in EXP960.INCL.
Please add this library to your COBOL compiler SYSLIB DD
chain.
The sublibrary EXP960 of the EntireX CICS installation
provides the user exit skeleton COBUEX02.C
for COBOL.
Copy this skeleton so you have your own user exit source for modifications.
Accordingly, a COBOL copybook COBUEX02.CPY
is provided in EXP960.
Hint: The copybook extension CPY
might not be understood by the z/VSE COBOL compiler. In this case, copy COBUEX02.CPY
into your copybook library and rename it to COBUEX02.C
. Add this library to your COBOL compiler LIBDEF
chain.
The most important API parameters of the user exit are described below. Other parameters are informational and are described
in the source code.
The user exit program must comply with the EXEC CICS LINK PROGRAM COMMAREA
conventions.
Parameter | Description |
---|---|
VERSION |
Required for future changes. Do not change the skeleton code. |
ERROR-CODE |
You can terminate the current request: Any number between 1 and 9999 will cause the CICS RPC Server to stop execution of the current RPC request and pass back the given error code with message class 1022 to the RPC client. See Message Class 1022 - CICS RPC Server User Exit Messages. With error code 0000, the CICS RPC Server continues as normal. |
ERROR-TEXT |
If the error code is not zero, an error text of up to 256 characters may be applied. This is passed to the RPC client. |
CICS-TRANSID |
Can be applied in the event START-USER , otherwise it is informational. Apply the TRANSID that your business logic requires.
|
CICS-TERMID |
Can be applied in the event START-USER , otherwise it is informational. In some (rare) cases, RPC server routines require a terminal ID. Apply the TERMID that your business logic requires.
|
USERID |
Can be applied in the event START-USER otherwise it is informational. Under some circumstances, it might be necessary to change the original RPC-USERID from the calling RPC client.
|
DATA-POINTER |
This pointer refers to the payload data for the events CALL-START and CALL-END . The payload to which this pointer is pointing may be inspected as well as modified. The pointer itself must not be changed.
|
Apply the name of your exit routine to the EntireX RPC server ERXMAIN
macro parameter EXIT
. See Configuring the RPC Server.
At startup, the CICS RPC Server will call the named user exit to synchronize its version.
If successful, the RPC Online Maintenance Facility will display the user exit as map field "parameter opts
". See
To display the Server parameters (PF06) under RPC Online Maintenance Facility.
The CICS RPC Server will continue and call the user exit for the implemented events.
If you need to install multiple instances in the same CICS region, see Installing Multiple EntireX RPC Servers in the same CICS (Optional) under Installing EntireX RPC Servers under CICS in the z/VSE installation documentation.