Installing the BS2000/OSD Batch RPC Server

The EntireX BS2000/OSD Batch RPC Server allows standard RPC clients to communicate with RPC servers on the operating system BS2000/OSD. It supports the programming languages COBOL and C. This document covers the following topics:

For Natural RPC servers, see Setting Up a Natural RPC Environment in your Natural documentation.


Step 1: Define a Server-side Mapping Container

If you are using or plan to use server-side mapping files, you need to set up a server-side mapping container. A server-side mapping file is an EntireX Workbench file with extension .svm. See Server Mapping Files for COBOL. If this step is omitted, the RPC server will start without the server-side mapping container. This means that server programs cannot make use of special COBOL syntax and features. See When is a Server Mapping File Required? in the EntireX Workbench documentation.

The server-side mapping container stores the content of server-side mapping files, which are used at runtime to marshal and unmarshal the RPC data stream. This enables the RPC server to support special COBOL syntax. The server-side mapping container is technically an ISAM file that needs to be defined and initialized. Each RPC server requires its own server-side mapping container.

Customize S-procedure CREATE-SVM-FILE in EXP811.JOBS.

Procedure Parameter Description Default
EXP-LIB BS2000/OSD Batch RPC Server load library. EXP811.LIB
SVM-FILE Name of server-side mapping container (ISAM file) to store the contents of EntireX Workbench server-side mapping files. SVMFILE
SYSOUT-FILE SYSOUT file name. RPC.SYSOUT.CREASVM

The name of the server-side mapping container (ISAM file) must correspond to the SVM-FILE parameter specified in the BS2000/OSD Batch RPC Server startup job control. See Step 4: Customize the BS2000/OSD Batch RPC Server Startup JCL.

See also Server-side Mapping Files in the BS2000/OSD Administration documentation.

Step 2: Customize the BS2000/OSD Batch RPC Server Configuration File RPC-CONFIG

RPC-CONFIG in EXP811.JOBS contains the RPC server parameters. If the default settings are used, only the BROKERID parameter needs to be set up according to your environment. The BS2000/OSD Batch RPC Server will then run in a default configuration.

Depending on the communication method, the Broker ID has two formats:

  • TCP Transport Method
    ip:port:TCP
    where ip is the address or DNS host name,
      port is the port number that EntireX Broker is listening on, and
      TCP is the protocol name
  • NET Transport Method
    ETBnnn:SVCmmm:NET
    where nnn is the ID under which EntireX Broker is connected to the Adabas ID table,
      mmm is the SVC number under which the Adabas ID table can be accessed, and
      NET is the protocol name

If the provided parameter file is used, the RPC server will run as a COBOL server. Besides the RPC service (RPC/SRV1/CALLNAT), it will register the DEPLOYMENT and the EXTRACTOR service. This corresponds to the delivered settings in the broker attribute file on BS2000/OSD and other platforms. The server is configured to run with a fixed number of 3 worker task replicates. System Management Hub support and security are turned off.

See also Configuring the RPC Server.

The default configuration file RPC-CONFIG:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                                     *
*            EntireX RPC Server v8.1 Configuration File               *
*                                                                     *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* * * * * * * * * * EntireX Broker Parameters * * * * * * * * * * * * *
*
BROKERID=<ipaddr>:<port>:TCP                Broker Id if TCPIP is used
* BROKERID=ETB<nnnnn>::NET                  Broker Id if NET is used
*
SERVERNAME=SRV1
SERVICE=CALLNAT
CLASS=RPC
*
TIMEOUT=300                                 Seconds
LOGON=YES                                   EntireX Broker Logon
*
* CODEPAGE=EDF041
*
* KERNELSECURITY=YES                        EntireX Broker Security
* USERID=<userid>
* PASSWORD=<password>
*
*
* * * * * * * * * * EntireX RPC Server Parameter  * * * * * * * * * * *
*
RESTARTCYCLES=3                             default is 15
* TRACELEVEL=NONE                           NONE, STANDARD or ADVANCED
* SMHPOPT=<smhport>
*
* EntireX RPC Cobol Server Configuration
* ---------------------------------------------------------------------
SVM=PREFERRED
DEPLOYMENT=YES
EXTRACTOR=YES
MARSHALLING=(LANGUAGE=COBOL)
*
* EntireX RPC C Server Configuration
* ---------------------------------------------------------------------
* EXTRACTOR=YES
* MARSHALLING=(LANGUAGE=C)
*
* Start up a fixed number of workers
* ---------------------------------------------------------------------
WORKERMODEL=(FIX,3)
*
* Balance the load of available workers
* ---------------------------------------------------------------------
* WORKERMODEL=(SCALE,2,5)
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Step 3: Customize ADALNK Parameter File RPC-ADAPARM

The BS2000/OSD Batch RPC Server requires ADALNK parameters when a local communication with an EntireX Broker on same machine is desired (XCOM communication). Set up the IDTNAME in RPC-ADAPARM in EXP811.JOBS under which the broker has registered at the Adabas ID table.

Parameter Description
ADALNK IDTNAME=ADA<xxxxx> Specifies the ID table name under which EntireX Broker is accessible.

Step 4: Customize the BS2000/OSD Batch RPC Server Startup JCL

The job control delivered with BS2000/OSD Batch RPC Server makes use of BS2000/OSD S-procedures. We strongly recommend you do not modify START-RPC-SERVER. This procedure is recursively called to establish the RPC server environment. Modifications should only be done to the PARAMETER-DECLARATION section as described below. If all RPC server components are installed under the same BS2000/OSD user ID and all previous installation steps have been done using the default settings, no modifications to START-RPC-SERVER are necessary to run a COBOL server and execute the delivered examples.

Procedure Parameter Description Default
EXP-JOBS Batch RPC Server jobs library. EXP811.JOBS
EXP-LIB Batch RPC Server load library. EXP811.LIB
EXX-LIB EntireX Broker load library. EXX811.LIB
WAL-MOD WAL library. WAL826.MOD
PROGRAM-LIB Server module library. Additional server module libraries can be included in the BLSLIB chain. (See the SET UP FILE LINKS section in the START-RPC-SERVER job control.) There are two sample server libraries delivered:
EXP811.COBS COBOL sample server module library. See Client and Server Examples for BS2000/OSD in the COBOL Wrapper documentation.
EXP811.CSRV C sample server module library. See Server Examples for BS2000/OSD in the C Wrapper documentation.
EXP811.COBS
ADABAS-PARAMETERS Adabas parameters used for XCOM communication method. RPC-ADAPARM
RPC-CONFIG-FILE RPC configuration parameter file. RPC-CONFIG
SVM-FILE Server-side mapping container (ISAM file) to store server-side mapping files. SVMFILE
PROC-NAME The name of the START-RPC-SERVER procedure. START-RPC-SERVER
WORKER-JOB-NAME Job name of the worker tasks. RPCWORK
LOG-FILE-PREFIX
File name prefix used for the SYSOUT files of the main and worker tasks. The following SYSOUT files are generated:
for the main task: log-file-prefix.tsn.RPCMAIN
for each worker task and the SMH task: log-file-prefix.tsn.RPCWORK
RPC.
WORKER-JOB-CLASS Job class of the worker tasks *STD
WORKER-CPU-LIMIT CPU limit of the worker tasks. If this parameter is set to *NO, the user ID requires the permission to run jobs with TIME='NTL' in the job class assigned *STD
CRTE-LIB BS2000/OSD Common Runtime Environment (CRTE) library $.SYSLNK.CRTE
STUB-TRACE-LEVEL Trace level of the EntireX Broker stub. For diagnostic purposes it can be set to 1, 2 or 3 0
LOGGING The logging parameter is passed to the worker task job control and the SYSJ elements executed *NO
WORKER-PARMS Is filled during runtime with the worker task parameters. Note: Do not modify it ! *RPC
MAIN-TASK-TSN Is filled during runtime with the main task TSN. Note: Do not modify it! *RPC

Starting the RPC Server

Start of instruction setTo start the BS2000/OSD Batch RPC Server

  • Use the following SDF command:

    /ENTER-PROCEDURE *LIB(LIB=EXP811.JOBS,ELE=START-RPC-SERVER), -
    /JOB-NAME=RPCMAIN,LOG=*NO

Stopping the RPC Server

Start of instruction setTo stop the BS2000/OSD Batch RPC Server using System Management Hub

  • Use the RPC server agent in the SMH to stop the BS2000/OSD Batch RPC Server.

Start of instruction setTo stop the BS2000/OSD Batch RPC Server from a privileged user ID

  • Enter the command:

    /INFORM-PROGRAM MSG='STOP',JOB-IDENTIFICATION=*TSN(TSN=tsn)
    where tsn is the task number associated with the BS2000/OSD Batch RPC Server main task (in the example above the TSN of RPCMAIN)

    All other tasks that were created as a result of starting the batch RPC server will be stopped automatically.

Start of instruction setTo stop the BS2000/OSD Batch RPC Server from an operator console

  • Enter the command:

    /INTR tsn,STOP
    where tsn is the task number associated with the BS2000/OSD Batch RPC Server main task (in the example above the TSN of RPCMAIN)

    All other tasks that were created as a result of starting the batch RPC server will be stopped automatically.

Start of instruction setTo stop the BS2000/OSD Batch RPC Server from a non-privileged user ID

  • Use S-procedure STOP-RPC-SERVER in EXP811.JOBS.

    Startup Parameter Description Default
    BROKER-ID Depending on the communication method, the broker ID can be specified in two different formats:
    • TCP Transport Method
      ip:port:TCP
      where ip is the address or DNS host name,
        port is the port number that EntireX Broker is listening on, and
        TCP is the protocol name
    • NET Transport Method
      ETBnnn:SVCmmm:NET
      where nnn is the ID under which EntireX Broker is connected to the Adabas ID table,
        mmm is the SVC number under which the Adabas ID table can be accessed, and
        NET is the protocol name
    none
    CLASS The class name under which the RPC server is registered at the EntireX Broker. RPC
    SERVER The server name under which the RPC server is registered at the EntireX Broker. SRV1
    SERVICE The service name under which the RPC server is registered at the EntireX Broker. CALLNAT
    USERID If EntireX Broker is running with EntireX Security, a user ID needs to be supplied none
    PASSWORD If EntireX Broker is running with EntireX Security, a password needs to be supplied none
    EXX-JOBS EntireX Broker jobs library EXX811.JOBS
    EXX-LIB EntireX Broker module library EXX811.LIB
    WAL-MOD WAL module library WAL826.MOD

    Set the broker ID in the PARAMETER-DECLARATION section and enter following command:

    /CALL-PROCEDURE (EXP811.JOBS, STOP-RPC-SERVER)

Verifying the Installation of the BS2000/OSD Batch RPC Server

The BS2000/OSD Batch RPC Server is delivered with libraries that contain COBOL client sample programs, and COBOL and C server sample programs. The sample client and server programs can be used for installation verification. They also correspond to the basic and reliable RPC examples delivered with the EntireX Developer's Kit on other platforms, for example UNIX and Windows.

See Client and Server Examples for BS2000/OSD in the COBOL Wrapper documentation and Server Examples for BS2000/OSD in the C Wrapper documentation.