PreviousCICS and DB2 (Host Compatibility Option) Windows TipsNext"

Chapter 37: IMS and DB2 (Host Compatibility Option)

In this session you use IMS Option and Host Compatibility Option together.

You need to have read the chapter Start Here for the Tutorials and worked through the first session, Using Mainframe Express before you do this session. You also need to have worked through the sessions IMS Applications and DB2 Applications (Host Compatibility Option)

You need to have installed the IMS and Host Compatibility Options to do this session. Note that Setup will only have offered you the option to install Host Compatibility Option if you ran it with the /hco command line parameter. Otherwise it will have offered SQL Option instead.

We assume you are familiar with IMS and DB2 on a mainframe.

You must also have IBM's DB2 Universal Database system installed.

37.1 Overview

This session shows you how to get an application that includes IMS and DB2 working on your PC, using IMS Option and Host Compatibility Option.

This session uses the same demo application as the chapter DB2 Applications (Host Compatibility Option). It uses the DB2DEMO database that you created in that session.

37.2 Preparation

  1. Issue a DB2START command if you have not already done so. In the DB2 Command Window, enter:


  2. You can now close the DB2 Command Window.

  3. If you have closed Mainframe Express, open it as before. If any project window or other windows are open, close them.

37.3 Sample Session

In this session you:

37.3.1 Creating a Project

To create the project:

  1. Click New on the File menu, then select Project on the New dialog box and click OK.

  2. Enter hcimdemo as the name of the project and change the name of the Project Folder to d:\mfuser\projects\gsdemo\hcimdemo, then click Next.

  3. Accept the default, Using this wizard, and click Next.

  4. Leave the default folder for the catalog unchanged and click Next.

    You now get a page asking which of the installed options this project uses.

  5. Ensure that only the IMS and SQL check boxes have check marks, and click Next.

    Because you have said this project uses SQL, and you installed Host Compatibility Option (rather than SQL Option), you now get a dialog box asking the name of the DB2 database.

  6. Enter DB2DEMO and click Next.

  7. Click Finish.

37.3.2 Adding Files to the Project

To add your files to the project:

  1. Click Add Files on the Project menu.

  2. In the Add Files to Project dialog box, open the folder \mfuser\projects\gsdemo\hcimdemo\source. Ensure the Files of Type field is set to Source Files.

  3. Click Add All, then click Yes on the confirmation message.

    The files are added to the project.

  4. Click Done.

37.3.3 Building the Project

To build the project:

  1. Click Build on the Build menu.

    The build finishes with "Build finished with no errors".

37.3.4 Defining an IMS Transaction

To define IMS transactions for the project's programs:

  1. Click the IMS tab at the bottom of the project view.

  2. Click Transactions on the left-hand pane.

    The right-hand pane now lists all the transactions in the application. Initially, there are none.

  3. Right-click on the right-hand pane and click Add New Entry on the popup menu.

    The Transaction Codes dialog box appears.

  4. Enter the following (leave the remaining fields unchanged), and click OK.
    Program Type MPP
    Trancode Name HCODEMO
    PSB Name HCODB2T
    Program Name HCODB2T
    Process Limit Count 99
    Maximum seg no. 99

    An entry for transaction HCODEMO appears in the list in the right-hand pane.

37.3.5 Running the Application

To run the application:

  1. Click Run on the Debug menu.

  2. Select the IMS tab, and enter HCODEMO in the Command or transaction code field, then click OK.

    The Application Output window appears. The application displays its output there.

    In the following, the Application Output window must be selected, so that keystrokes are directed to it and not to some other window. It should be automatically selected when it appears, but if in doubt click in it with your mouse.

  3. Press Enter to see the rest of the output.

  4. Press F3.

    This exits from the transaction, and the Application Output window shows a screen with a cursor and a message saying HCODEMO has ended.

  5. Type /RCL and press Enter.

    This exits from IMS. The Application Output window is cleared.

37.4 Before Continuing

Hide the Application Output window.

You can close DB2 if you wish.

Close the project. If you want to take a break before going on to the next session, you can close Mainframe Express.

Return to the Tutorials Map in the chapter Start Here for the Tutorials and choose which session to go on to next, depending on your interests.

Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousCICS and DB2 (Host Compatibility Option) Windows TipsNext"