Create a CICS service

This scenario shows how you can recreate the CICS inquireSingle service for the catalog manager example application using the API toolkit.

Before you begin

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 inquireSingle service.
  4. Use the z/OS Connect API toolkit to Stop the inquireSingle service, and then Remove the inquireSingle service.

About this task

In this scenario we use the API toolkit running on a Windows workstation to recreate the CICS inquireSingle service. The service archive file uses an existing CICS COBOL copybook from the catalog manager example application.
Diagram showing how IBM z/OS Connect connects the user to a CICS region.


  1. Start IBM Explorer for z/OS and open the z/OS Connect (OpenAPI 2) perspective.
  2. Right click in the project explorer window and select File > New... > Project. Select the z/OS Connect Service Project wizard.
  3. Fill in the sections for the new service project and click Finish.
    Screen capture of the IBM z/OS Connect Service Project entry screen
  4. The IBM z/OS Connect Service Project Editor dialog opens.
    Add the program name DFH0XCMN to the program: input area, as shown.
    Service definition page in the Service Project Editor.
  5. Click the Configuration tab at the bottom of the screen.
    Add the connection reference cicsConn
    The Configuration page in the service Project Editor.
  6. Click the Definition tab at the bottom of the screen.
  7. Click Create Service Interface.
    Add the service interface name DFH0XCP4 and click OK.
    Screen capture of the Create Service Interface.
    The service interface editor.
  8. You have created a new service interface file. In the Service Interface editor, click Import COBOL or PLI data Structures into the service interface .
  9. Locate the COBOL copybook and import it from the file system. To import the copybook directly from your CICS installation, select z/OS system from the Import from: list and locate the copybook from the Source PDS: list. If the copybook is on your local workstation, select Local file system from the Import from: list and locate the copybook from the Source folder: list.

    Screen capture of the Import entry screen.

  10. Click Add to Import List to import the DFH0XCP4 data structure from the copybook, and click OK.
    Data structure imported into the service interface editor.
  11. Unselect the Include checkboxes for FILL_0 and FILL_1 to hide these fields from the user of the service as they are for internal use by the CICS application.
  12. Save your changes to the service interface DFH0XCP4.
  13. Click Definition tab for the inquireSingle service. As there is only one service interface file, in the service interfaces folder for this project, it is automatically selected in the Request service interface and Response service interface fields.
    The service definition page in the Service Project Editor with the request and response service interfaces specified.

    Save the InquireSingle service.

  14. Right click inquireSingle in the Project Explorer view. Click z/OS Connect > > Export z/OS Connect Service Archive.
    The Export Service Package entry screen.
  15. Click Browse to select the directory where you want to save the service archive file and click OK.


The InquireSingle service archive file inquireSingle.sar is now ready to be deployed.

What to do next

Deploy and test your newly created InquireSingle service.