Previous Topic Next topic Print topic


Preparing the Client Program

You need to insert your ECI calls to the CTG in your program. In COBOL, an ECI call looks like this:

CALL "CICS_ExternalCall" USING ECI-PARMS

ECI-PARMS is the ECI parameter block, through which the program communicates with the server. The parameter control block is available as a copybook in the copybook folder within your CTG installation. It is called cicseci.cbl. You need to make this copybook available to your client program. You do this by adding the CTG copybook directory to the COBCPY environment variable.

When you compile your program to an executable, you must link it to the CTG library, cclwin32.lib.

For further information about using CICS Transaction Gateway, see the IBM manual CICS Family: Client/Server Programming (SC33-1435).

Before you run the demonstration, prepare the Net Express client as follows:

  1. Locate the following code in the program eci-call.cbl
    01 ECI-Client-Type. 
            03 pic x comp-x 
               *> --
               *> --Change the following value to select client type
               *> --
               value 0.
           88 ECI-MicroFocus-88 value 0.  
           88 ECI-UniCli-88     value 1. 

    Change the above value clause to set ECI-Client-Type to 1.

  2. Save the program.
  3. Set the COBCPY environment variable to include the copybook directory of your CTG installation. This enables the project to locate the ECI copyfiles supplied by the CTG. To set the COBCPY environment variable edit the Project Properties
    1. Click Project > Properties
    2. Click IDE.
    3. Click Import.
    4. Select COBCPY and click OK.
    5. Double-click COBCPY.
    6. In the Value field, add a semicolon at the end, followed by the copybook directory of your CTG installation.
    7. Click Set and then OK.
  4. Notice in the project properties that EXEC CICS is not enabled for the project, since the client program is not a CICS program.
  5. Rebuild the program.
Previous Topic Next topic Print topic