PreviousAssembler, CICS, IMS, DB2 (Host Compatibility Option) IMS and DB2 (Host Compatibility Option)Next"

Chapter 36: CICS and DB2 (Host Compatibility Option)

In this session you use CICS 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 CICS Applications and DB2 Applications (Host Compatibility Option)

You need to have installed the CICS 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 CICS and DB2 on a mainframe.

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


36.1 Overview

This session shows you how to get an application that includes CICS and DB2 working on your PC, using CICS 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.

36.2 Preparation

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

    db2start

  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.

36.3 Sample Session

In this session you:

36.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 hccidemo as the name of the project and change the name of the Project Folder to d:\mfuser\projects\gsdemo\hccidemo, 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 CICS and SQL check boxes have check marks, and click Next.

    Because you have said this project uses CICS, you get the pages that relate to CICS.

  6. Leave the default CICS region name unchanged and click Next.

  7. Leave the default folder for the resource definition file unchanged and click Next.

  8. From the pulldown list, select MCOSIT for the System Initialization Table 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.

  9. Enter DB2DEMO and click Next.

  10. Click Finish.

36.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\hccidemo\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.

36.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".

36.3.4 Adding PCT Entries

To define CICS transactions for the project's programs:

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

  2. Click Program Control Table (PCT) in the left-hand pane

  3. Use Add new entry (right-click in the right-hand pane and click Add new entry), to add the following transaction (remember the Transaction ID is case sensitive):
    Transaction ID Program Description
    HCDC HCODB2C CICS program to read DB2 database

36.3.5 Running the Application

To run the application:

  1. Click Run on the Debug menu.

  2. Select the CICS tab, and enter HCDC (upper case) in the Initial Tran Id field, then click OK.

    The Application Output window appears, emulating a 3270 terminal. Messages appear, showing the application starting up, then the application displays its output.

  3. Press CICS Clear (Esc), to end the application.

  4. Type EXIT and press 3270 Enter (right-hand Ctrl) to terminate CICS.

36.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.

PreviousAssembler, CICS, IMS, DB2 (Host Compatibility Option) IMS and DB2 (Host Compatibility Option)Next"