Host Compatibility Option is composed of a group of tools that perform different functions that make developing DB2 and SQL applications easier. Before you start, make sure you have installed the software as described in the chapter Installing Host Compatibility Option. Otherwise, Host Compatibility Option does not work properly!
A number of changes have been made to Host Compatibility Option, some of which are very obvious and some of which are not. The intention is to provide you with software which is easier to use with more functionality. In general, the following is new or improved:
For an introduction to using Host Compatibility Option tools, we recommend that you work through the tutorials described in your Getting Started.
Host Compatibility Option tools are invoked from the IDE. When you display the IDE (see Figure 5-1) and have a project open, you can run any of the Host Compatibility Option tools as follows:
Figure 5-1: IDE
The Host Compatibility Option menu enables you to invoke the following tools:
|Create Database||Invoke the Create Database tool. Use this to create databases using EBCDIC collating sequences.|
|DDL Processor||Invoke the DDL Processor tool. Use this to process DDL statements using either mainframe (DB2 for OS/390) or DB2 Universal Database syntax.|
|Execute SQL <file name>||Execute SQL statements (either DDL or DML) contained with file name selected. You need to add files containing SQL statements to Mainframe Express project and select one before this menu choice is enabled.|
|DCLGEN||Invoke the Generate Copybook tool. Use this to generate
|Generate Alias||Invoke the Generate Alias tool. Use this
|Export||Invoke the Export Data tool. Use this to export data from SQL tables in IXF, DEL, DSNTIAUL or DBMAUI format.|
|Import||Invoke the Import Data tool. Use this to import data into SQL tables in IXF, DEL, DSNTIAUL or DBMAUI format.|
|Catalog Database||Invoke the Catalog Database tool. Use this to catalog or uncatalog databases on a PC. You can also use this to test a connection to a database once the database has been cataloged to make sure everything has been set up correctly.|
|Catalog Server||Invoke the Catalog Server tool. Use this to catalog or uncatalog remote database servers on a PC. Use the server definition to define both the remote database server to access as well as the communications protocol to use to access it.|
|SQL Error Message||Invoke the SQL Error Message tool. This tool displays error messages associated with a SQLCODE in a similar way to the DSNTIAR utility.|
|SQL Query||Invoke the SQL Query tool. Use this to run or explain a query that you have developed before you place it in your program.|
|Configuration||Select this option to set default configuration values. The defaults set with this option go into effect the next time you use a Host Compatibility Option tool. See the chapter Setting INI Options for more details.|
|Bind Programs||Invoke the Bind Programs tool. This tool will bind or re-bind selected bind files to a database with the bind options selected.|
Before you can do any development, you need to have an SQL database. Depending on your organization's standards, this may be done for you by your database administrator, network administrator or you may have to do it yourself.
The IBM software that you have installed determines what you do next:
|Software Installed on PC
||Which Tool to Use
|DB2 Universal Database Personal Edition
||Use the Create Database tool to create a database. See the chapter Create Database for more information.|
|DB2 Universal Database Workgroup or Enterprise Edition||Use the Create Database tool to create a database. If you have DB2 Universal Database server software installed, this function can be performed directly from a client PC. See the chapter Create Database for more information.|
|DB2 Application Development Client||For these:
Or use the IBM supplied tools to Catalog Server and Database. Starting with DB2 UDB v7.1, this product mut also be installed to compile programs.
|DB2 Connect||Catalog the DRDA server and database that you want to access. You need to use IBM supplied tools to do this. See IBM Command Reference and DB2 Connect User's Guide for more details.|
The first time you use any of the Host Compatibility Option tools with a database, Host Compatibility Option automatically tries to bind itself to the database being connected to. If the database is on the mainframe, this automatic bind may fail if you do not have the authorities 'Create in collection NULLID' and 'BINDADD'. If an automatic bind fails, it is worth trying a manual bind, because the message returned from a manual bind will clearly indicates why the bind failed.
You perform a manual bind using the DB2 command processor. Enter the following commands in an MS-DOS window:
DB2 connect to <server> DB2 bind c:\mfe\mfhco\bin\mfhco70b.bnd
where server is the name of the DB2 server for the database that you want to connect to.
If this bind fails, ask your Database Administrator to help resolve the problem since it is probably an authority issue.
Copyright © 2001 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.