DB2 Applications (Host Compatibility Option) | IMS Applications |
You can use Host Compatibility Option to run applications containing inner and outer joins.
You need to have read the chapter Start Here for the Tutorials and worked through the first session, Using Mainframe Express, and the session DB2 Applications (Host Compatibility Option) before you do this session.
You need to have installed Host Compatibility Option to do this session. We assume you are familiar with DB2 on a mainframe.
You must also have IBM's DB2 Universal Database V5 system installed. Inner and outer joins are not supported by versions before V5.
This short session shows you an application that includes inner and outer joins working on your PC, using Host Compatibility Option.
This session uses the SAMPLE database that comes with IBM's DB2 Universal Database.
Joining is the process of combining data from two or more tables. The database manager forms all combinations of rows from the specified tables, and then selects those that conform to the join condition that you specify. For a fuller description of joins, see the SQL Getting Started book that comes with IBM's DB2 Universal Database V5.
db2start
db2sampl
If the database does in fact exist, this command results in a number of error messages. You can ignore these messages.
Creating a project for a DB2 application that uses joins is just the same as for any other DB2 application. Since this application does not use CICS or IMS, it is just like in the chapter DB2 Applications (Host Compatibility Option).
To save you creating the project used in this session, we supply the project hcjndemo.mvp.
The full path is \mfuser\projects\gsdemo\hcjndemo\hcjndemo.mvp. If you use Open on the File menu, you need the Files of Type field on the Open dialog box set to Project Files (*.mvp) to see this file.
In this session you:
To build the project:
The build finishes with "Build finished with no errors".
To run the application:
The application runs. The Application Output window appears and displays the screen output from the application. The application displays the output from the JOIN statements in the program.
If you get a "***" line indicating more input is required, just press Enter to let the application complete.
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.
DB2 Applications (Host Compatibility Option) | IMS Applications |