EntireX Version 9.7
 —  EntireX C Wrapper  —

Server Examples for BS2000/OSD

This document describes the examples provided for the C Wrapper for BS2000/OSD. It covers the following topics:


Overview

The following C RPC Server example is delivered for BS2000/OSD:

The EXAMPLE server module contains the server-side implementation of the procedure SQUARE and the function CALC.

Element Type LMS Library Comment Notes
CREATE-EXAMPLE-SERVER J EXP811.CSRV S-procedure to generate the C RPC sample server. It uses RUN-CPLUS-COMPILER.  
RUN-CPLUS-COMPILER J EXP811.CSRV S-procedure to run the CPLUS compiler.  
EXAMPLE.C S EXP811.CSRV C RPC sample server program source. 1
DEXAMPLE.C S EXP811.CSRV C RPC sample server stub source. 1
ERX.H ERXVDATA.H ERXARRAY.H S EXP811.CSRV RPC runtime header files.  
ETBCDEF.H S EXP811.CSRV C language ACI control block definitions.  

Notes:

  1. When compiling the C server example sources, the compiler may issue warnings. These warnings can be ignored.

Top of page

Creating the C RPC Sample Server

Start of instruction setTo create the server EXAMPLE

  1. Parametrize S-procedure CREATE-EXAMPLE-SERVER, if needed.

    Procedure Parameter Description Default
    EXP-SRV-LIB C RPC Server examples library EXP811.CSRV

    For more details, see also the procedure headers in the delivered job control.

    Enter the following command:

    /CALL-PROCEDURE *LIB(LIB=EXP811.CSRV,ELE=CREATE-EXAMPLE-SERVER)
  2. Enter the following command:

    This procedure calls the CPLUS Compiler to generate the corresponding object modules stored as L-elements in EXP-SRV-LIB (the default is EXP811.CSRV).

There is no need to link the object modules with the BS2000/OSD Common Runtime Environment (CRTE) library. The CRTE is loaded once dynamically in the corresponding worker task of the RPC server where the server program is executed. The C RPC example server corresponds with the delivered CALC and SQUARE COBOL clients.

Top of page