Version 9.5 SP1
 —  EntireX z/OS CICS® RPC Server  —

Introduction to CICS RPC Server

The EntireX z/OS CICS® RPC Server allows standard RPC clients to communicate with RPC servers on the operating system z/OS under CICS. It supports the programming languages COBOL and PL/I.

This document covers the following topics:


Inside the RPC Server

This section covers the following topics:

Worker Models

graphics/intro_inside_workerModels.png

RPC requests are worked off inside the RPC server in worker tasks, which are controlled by a main task. Every RPC request occupies during its processing a worker task. If you are using RPC conversations, each RPC conversation requires its own task during the lifetime of the conversation. The CICS RPC Server provides two worker models:

Inbuilt Services

CICS RPC Server provides several services for ease-of-use:

Deployment Service

The Deployment Service allows you to deploy server mapping files (SVM files) interactively using the Deployment Wizard (see Server Mapping Deployment). On the RPC server side, the SVM files are stored in a VSAM file as the container. See Deployment Service for configuration information.

graphics/intro_inside_inbuilt_deployment.png

SMH Listener Service

With the SMH Listener Service you use the System Management Hub to monitor the RPC server. See Administering the EntireX RPC Servers using System Management Hub under UNIX | Windows.

The SMH Listener Service is switched on if the SMH port number is set. See the ERXMAIN macro parameter SMH under Configuring the RPC Server.

graphics/intro_inside_inbuilt_smh.png

User Exits

This section covers the following topics:

User Exit COBUEX02

The CICS RPC Server provides a user exit to influence/control the RPC logic. The exit is called on the events START-WORKER, START-USER, CALL-START and CALL-END. The following tasks can be performed:

graphics/no1.png START-WORKER event before a CICS worker task is started. This allows you to programatically set the CICS transaction ID.
graphics/no2.png START-USER event. Apply CICS transaction ID and user ID to impersonated worker tasks. See Impersonation.
graphics/no3.png CALL-START event. Inspect, modify or terminate the RPC request (payload) from the RPC client.
graphics/no4.png CALL-END event. Inspect or modify the RPC reply (payload) or give an error to the RPC client.

graphics/intro_inside_userExits.png

See also Writing and Configuring User Exit COBUEX02.

User Exit RPCUEX01

The server invokes the server program using CICS LINK PROGRAM and expects that the program returns with CICS RETURN. However, if the program uses CICS ABEND CANCEL to abort for particular error situations, the RPC server cannot trap the abort. If your server program uses CICS ABEND CANCEL you need to call the delivered RPCUEX01 to inform the server that your program is about to abort with CICS ABEND CANCEL.

graphics/intro_inside_userExits_rpc.png

graphics/no1.png The server program is invoked within the user task.
graphics/no2.png The server program decides to abort using CICS ABEND CANCEL immediately before it calls the user exit. Then the server program can perform CICS ABEND CANCEL to abort. The CICS ABEND CANCEL terminates the user task.
graphics/no3.png The user exit posts the worker task and informs it about the abort of its associated user task. The worker task sends back the abort information to the client.

See also Using User Exit RPCUEX01.

Top of page

Impersonation

graphics/intro_impersonation.png

The CICS RPC Server can be configured to execute the RPC request impersonated under the RPC client user ID. For this, worker tasks start additional impersonated user tasks. This can be useful, for example for accounting. Impersonation is controlled by the ERXMAIN macro parameter IMPS. For IMPS value AUTO, the CICS RPC Server does not validate RPC passwords, so you have to take care the RPC client is correctly authenticated, either by using a secure EntireX Broker (validation must be against the correct mainframe security repository where CICS user IDs are defined) or with your own security implementation.

The picture above shows the configuration impersonation=yes.

The lifetime of an impersonated user task starts when an open request for an RPC conversation or a non-conversational RPC request is received. It ends when the RPC conversation stops (after a commit operation or timeout) or when the non-conversational RPC request has been performed.

For worker tasks, the slow-shrinking worker model SCALE is used - value TIMEOUT is forced internally - any value given in the ERXMAIN macro parameter ENDW is ignored. The lifetime of worker tasks can be controlled with ERXMAIN macro parameter TOUT as well as the number of workers with macro parameters MINW and MAXW.

Top of page

Usage of SVM Files

To correctly support special COBOL syntax such as JUSTIFIED, SYNCHRONIZE and OCCURS DEPENDING ON clauses, LEVEL-88 fields, etc., the CICS RPC Server requires in many situations a server mapping file.

SVM files contain COBOL-specific mapping information that is not included in the IDL file and therefore not sent by an EntireX RPC client to the RPC server. See also When is an SVM File Required? under Handling SVM Files.

graphics/intro_useSvm.png

The RPC server marshalls the data in a two-step process: the RPC request coming from the RPC client (Step 1) is completed with COBOL-specific mapping information taken from the SVM file (Step 2). In this way the COBOL server can be called as expected.

The SVM files are retrieved as a result of the IDL Extractor for COBOL extraction process and the COBOL Wrapper if a COBOL server is generated.

You can customize the usage of the SVM file using the ERXMAIN macro parameter SVM. See Configuring the RPC Server.

Note:
SVM files are used for COBOL only.

Top of page

Interface Types Supported by the RPC Server

Supported interface types vary depending on the target programming language. See also Locating and Calling the Target Server.

COBOL

PL/I

Top of page

Automatic Syncpoint Handling

The CICS RPC Server issues a SYNCPOINT command under the following circumstances:

Top of page

Scenario I: Calling an Existing COBOL Server

Start of instruction setTo call an existing COBOL server

  1. Use the IDL Extractor for COBOL to extract the Software AG IDL and, depending on the complexity of the extraction, also an SVM file.

  2. Build an EntireX RPC client using any EntireX wrapper. See EntireX Wrappers. For a quick test you can:

See Client and Server Examples for z/OS CICS for COBOL RPC Server examples.

Top of page

Scenario II: Writing a New COBOL Server

Start of instruction setTo write a new COBOL server

  1. Use the COBOL Wrapper to generate a COBOL server skeleton and, depending on the complexity of the extraction, also an SVM file. Write your COBOL server and proceed as described under Using the COBOL Wrapper for the Server Side.

  2. Build an EntireX RPC client using any EntireX wrapper. See EntireX Wrappers. For a quick test you can:

See Client and Server Examples for z/OS CICS for COBOL RPC Server examples.

Top of page

Scenario III: Calling an Existing PL/I Server

Start of instruction setTo call an existing PL/I server

  1. Use the IDL Extractor for PL/I to extract the Software AG IDL.

  2. Build an EntireX RPC client using any EntireX wrapper. See EntireX Wrappers. For a quick test you can:

See Client and Server Examples for z/OS CICS for PL/I RPC Server examples.

Top of page

Scenario IV: Writing a New PL/I Server

Start of instruction setTo write a new PL/I server

  1. Use the PL/I Wrapper to generate a PL/I server skeleton. Write your PL/I server and proceed as described under Using the PL/I Wrapper for the Server Side.

  2. Build an EntireX RPC client using any EntireX wrapper. See EntireX Wrappers. For a quick test you can:

See Client and Server Examples for z/OS CICS for PL/I RPC Server examples.

Top of page

Returning Application Error Codes from a Server to a Client

See Returning Application Errors from a Server under z/OS CICS to a Client under Writing Applications with the COBOL Wrapper.

Top of page