Client and Server Examples for BS2000

This document describes the RPC examples provided. After installation of the EntireX Development Tools package, all examples here can be found in the EntireX directory examples/RPC. The basic RPC server example CALC is also delivered on BS2000 in the LMS library EXP103.COBS.
This document describes the following examples:


Basic RPC Client Examples - CALC, SQUARE

CALC

Element Type Comment Notes
CREATE-CALC-CLIENT J S-procedure to generate the CALC COBOL sample client application. It makes use of RUN-COBOL-COMPILER and BIND-CALC-CLIENT. 2
BIND-CALC-CLIENT J S-procedure to bind the CALC COBOL sample client application.  
RUN-COBOL-COMPILER J S-procedure to run the COBOL2000 / COBOL85 compiler. 2
RUN-CALC-CLIENT J S-procedure to run the CALC COBOL sample client application. 7
CALCCLT.COB S Main program source of the CALC COBOL example. 1
CALC.COB S COBOL RPC client interface object. 3
CALC S COBOL RPC interface copybook. 3
COBSRVI.COB S Generic RPC service. 4
ERXCOMM S Layout of the RPC communication area. See The RPC Communication Area (Reference). 3
CLIENT-ADAPARM S Adabas ADALNK IDTNAME parameter required when using the NET transport method. It is shared by all clients. 5
CLIENT-INPARM-CALC S CALC client input parameters. 6
  1. For applications built according to the client-side build instructions, see Using the COBOL Wrapper for Batch (z/OS, BS2000, z/VSE and IBM i).

  2. The default configuration expects a COBOL2000 environment. Depending on your installation it might be necessary to change the COMPILER parameter within the parameter declaration section of the procedures. The delivered procedures support both COBOL2000 and COBOL85 syntax.

  3. Generate these objects with the Designer.

  4. See Generation and Usage of Generic RPC Service Module COBSRVI.

  5. Optional. If NET is chosen as transport method, specify the name of the ID table to which the broker is connected: ADALNK IDTNAME=ADAxxxxx.

  6. Set up the BROKER-ID in one of two formats depending on the transport method:

    • 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
  7. Enter the following command to run the CALC COBOL sample client:

    /CALL-PROCEDURE *LIB(LIB=EXP103.COBC,ELE=RUN-CALC-CLIENT)

For more information refer to the file README.TXT in the EntireX directory examples/RPC/CobolServer/bs2000 under UNIX or Windows.

SQUARE

Element Type Comment Notes
CREATE-SQUARE-CLIENT J S-procedure to generate the SQUARE COBOL sample client application. It makes use of RUN-COBOL-COMPILER and BIND-SQUARE-CLIENT. 2
BIND-SQUARE-CLIENT J S-procedure to bind the SQUARE COBOL sample client application.  
RUN-COBOL-COMPILER J S-procedure to run the COBOL2000 / COBOL85 compiler. 2
RUN-SQUARE-CLIENT J S-procedure to run the SQUARE COBOL sample client application. 7
SQRECLT.COB S Main program source of the SQUARE COBOL example. 1
SQUARE.COB S COBOL RPC client interface object. 3
SQUARE S COBOL RPC interface copybook. 3
COBSRVI.COB S Generic RPC service. 4
ERXCOMM S Layout of the RPC communication area. See The RPC Communication Area (Reference). 3
CLIENT-ADAPARM S Adabas ADALNK IDTNAME parameter required when using the NET transport method. It is shared by all clients. 5
CLIENT-INPARM-SQUARE S SQUARE client input parameters. 6
  1. For applications built according to the client-side build instructions, see Using the COBOL Wrapper for Batch (z/OS, BS2000, z/VSE and IBM i).

  2. The default configuration expects a COBOL2000 environment. Depending on your installation it might be necessary to change the COMPILER parameter within the parameter declaration section of the procedures. The delivered procedures support both COBOL2000 and COBOL85 syntax.

  3. Generate these objects with the Designer.

  4. See Generation and Usage of Generic RPC Service Module COBSRVI.

  5. Optional. If NET is chosen as transport method, specify the name of the ID table to which the broker is connected: ADALNK IDTNAME=ADAxxxxx.

  6. Set up the BROKERID in one of two formats depending on the transport method:

    • 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
  7. Enter the following command to run the SQUARE COBOL sample client:

    /CALL-PROCEDURE *LIB(LIB=EXP103.COBC,ELE=RUN-SQUARE-CLIENT)

For more information refer to the file README.TXT in the EntireX directory examples/RPC/CobolServer/bs2000 under UNIX or Windows.

Basic RPC Server Examples - CALC, SQUARE

CALC

Element Type Comment Notes
CREATE-CALC-SERVER J S-procedure to generate the CALC COBOL example server. It makes use of RUN-COBOL-COMPILER. 2
RUN-COBOL-COMPILER J S-procedure to run the COBOL2000 / COBOL85 compiler. 2
CALC.COB S Server program source of CALC COBOL example. 1,3
  1. For applications built according to the server-side build instructions, see Using the COBOL Wrapper for Batch (z/OS, BS2000, z/VSE and IBM i).

  2. The default configuration expects a COBOL2000 environment. Depending on your installation it might be necessary to change the COMPILER parameter within the parameter declaration section of the procedures. The delivered procedures support both COBOL2000 and COBOL85 syntax.

  3. When executing:

    • make sure the RPC server runs as COBOL RPC server (refer to parameter marshalling in the RPC-CONFIG S-element in library EXP103.JOBS)

    • make sure that library EXP103.COBS is included as PROGRAM-LIB in the startup procedure START-RPC-SERVER

For more information refer to the file README.TXT in the EntireX directory examples/RPC/CobolServer/bs2000 under UNIX or Windows.

SQUARE

Element Type Comment Notes
CREATE-SQUARE-SERVER J S-procedure to generate the SQUARE COBOL example server. It makes use of RUN-COBOL-COMPILER. 2
RUN-COBOL-COMPILER J S-procedure to run the COBOL2000 / COBOL85 compiler. 2
SQUARE.COB S Server program source of SQUARE COBOL example. 1,3
  1. For applications built according to the server-side build instructions, see Using the COBOL Wrapper for Batch (z/OS, BS2000, z/VSE and IBM i).

  2. The default configuration expects a COBOL2000 environment. Depending on your installation it might be necessary to change the COMPILER parameter within the parameter declaration section of the procedures. The delivered procedures support both COBOL2000 and COBOL85 syntax.

  3. When executing:

    • make sure the RPC server runs as COBOL RPC server (refer to parameter marshalling in the RPC-CONFIG S-element in library EXP103.JOBS)

    • make sure that library EXP103.COBS is included as PROGRAM-LIB in the startup procedure START-RPC-SERVER

For more information refer to the file README.TXT in the EntireX directory examples/RPC/CobolServer/bs2000 under UNIX or Windows.