Sample for creating a CICS service with a properties file

This sample walks you through the steps to create a CICS® service by preparing a properties file for the service and generating the service archive using the build toolkit.

Before you begin

Note: Although the primary use cases are when the source of input is neither COBOL or PL/I, this sample shows you how to recreate the CICS inquireSingle service for the Catalog Manager example application (COBOL) for ease of testing.
To create and test the inquireSingle service, ensure that the following tasks are complete:
  1. Install and configure the CICS catalog manager example application. The procedure is described in the scenario Prepare the sample CICS application
  2. Install IBM z/OS Connect v3.0 or later. For more information, see Installing IBM z/OS Connect.
  3. Configure and test your IPIC connection to CICS. The procedure is described in the scenario Create a server and connect to CICS and installs relevant artifacts using the supplied configuration template sampleCicsIpicCatalogManager. This includes the inquireService service.
  4. Use the z/OS Connect API toolkit to Stop the inquireSingle service, and then Remove the inquireService service.

About this task

In this sample we use the build toolkit to recreate the CICS inquireSingle service. The service archive file uses an existing CICS COBOL copybook from the catalog manager example application.

Procedure

In this procedure, substitute the Windows example for the platform of your choice. The build toolkit properties files must be encoded in UTF-8.

  1. Create a local directory called: C:/CICSSPscenario on the Windows system.
  2. Download the Catalog Manager sample copybook to the local directory C:/CICSSPscenario created in step 1.
    The copybook is supplied by CICS TS in hlq.SDFHSAMP and is called DFH0XCP4, where hlq is the high-level qualifier (HLQ) of your CICS libraries. When you download the file, give it a file type of cpy, for example: DFH0XCP4.cpy.
  3. Download the build toolkit compressed file, zconbt.zip as a binary file, to the same local directory, C:/CICSSPscenario.
    The build toolkit is in the IBM z/OS Connect <installation_path> and is called zconbt.zip.
  4. Extract the zconbt.zip file into a zconbt sub directory of the C:/CICSSPscenario local directory.
    The directory structure should be as follows.
    C:/CICSSPscenario
        DFH0XCP4.cpy
        zconbt
            bin
            doc
            ...
    
  5. Add the zconbt executable to your path. For example, enter the following command: set PATH=C:/CICSSPscenario/zconbt/bin;%PATH%
  6. Create a service archive file for the Inquire Single service.
    1. Create a build toolkit properties file called InquireSingle.properties in the C:/CICSSPscenario directory.
      For example,
      
      name=inquireSingle
      provider=cics
      description=CICS Catalog Manager Inquire Single service
      version=1.0
      program=DFH0XCMN
      connectionRef=cicsConn
      language=COBOL
      programInterface=COMMAREA
      requestStructure=C:/CICSSPscenario/DFH0XCP4.cpy
      responseStructure=C:/CICSSPscenario/DFH0XCP4.cpy
    2. Run the build toolkit CLI to create the service archive file.

      In a command prompt window, enter the following command:

      zconbt --properties=C:/CICSSPscenario/InquireSingle.properties --file=C:/CICSSPscenario/InquireSingle.sar

Results

You can now deploy the service archive file by copying it to the services directory of your server.