Create an IMS database service

This scenario shows how you can create an IMS database service for the IMS sample application database by using the API toolkit.

Before you begin

To create and test the IVP database service, ensure that the following tasks are complete:
  1. Install and configure the IMS IVP sample database. The procedure is described in the scenario Prepare the sample IMS database.
  2. Install IBM z/OS Connect v3.0.30 or later. For more information, see Installing IBM z/OS Connect.
  3. Configure and test your IBM z/OS Connect server connection to an IMS database. The procedure is described in the scenario Create a server and connect to an IMS database, and installs relevant artifacts by using the supplied configuration template sampleImsDatabase, including the dbcontacts service.
  4. Configure and test your host connections for an IMS database. This procedure is described in Creating an IMS database host connection. Host connection are used to create service interfaces from SQL queries. For this example, the IMS database host connection is named IMSIVPDBConnection.

About this task

Diagram showing the request flow from client via IBM z/OS Connect and IMS Connect to the IMS program.

In this scenario, the API toolkit is running on a Windows workstation to recreate the IMS IVP database service. The service archive file uses an existing IMS IVP database that is configured on IMS in previous steps.

This scenario uses the following values and names:
  • IMSIVPCF = name of the IMS database connection profile created in previous steps.
  • IMSIVPDBConnection = the name of the IMS database host connection specified in pre-requisite step 4.

Procedure

  1. Switch to the z/OS Connect perspective.
    1. From the main menu, select Window > Open Perspective > Other
      The Select Perspective wizard opens.
    2. Click z/OS Connect.
    3. Click OK.
      The z/OS Connect perspective opens.
  2. Select File > New > Project.
    The New Project wizard opens.
  3. Select z/OS Connect > z/OS Connect Service Project, and click Next.
  4. Specify a project name, select the project type, and optionally provide a description.
    1. Specify the project name, dbPhonebook.
    2. For project type, select IMS Database Service.
    3. Click Finish to create the project.
      Figure 1. The New project wizard
      The service selection wizard
    The service project is created in the Project Explorer view. The service definition opens in the service project editor, where you can configure the service and define the service interface. The IBM z/OS Connect service project editor opens, with some errors initially that indicate some required information is still missing.
    Figure 2. The definition page in the service project editor
    Service project editor.
  5. In the Service Project Editor, specify the following information.
    1. For the Database Connection field, specify the database connection you configured pre-requisite step 3. In this example, the connection name is IMSIVPDBConnection.
    2. For the Database Name field, specify DFSIVP37.
    3. For the SQL command field, specify the following SQL statement: SELECT LASTNAME, FIRSTNAME, EXTENSION, ZIPCODE FROM PHONEAP.PHONEBOOK WHERE LASTNAME=?
  6. Click Generate Service Interface.
    A dialog box will appear and inform you that your service interface has successfully been created.
    Important: You must click the Generate Service Interface button any time changes are made to your SQL command.
  7. In the lower left area of the Service Project Editor, click the Configuration tab.
  8. In the Connection profile field, specify IMSIVPCF.
  9. Save your changes by clicking File > Save, or the windows shortcut Ctrl+S.

Results

You have created an IMS IVP database service and it is now ready to be deployed.

What to do next

Deploy the IMS database service using the API toolkit.