PreviousMigrating from XDB Migrating from MF/370 AssemblerNext"

Chapter 15: Migrating from Host Compatibility Option

The equivalent in Mainframe Express of the Micro Focus Host Compatibility Option (HCO) add-on for Workbench is also called Host Compatibility Option. It is an option that adds Host Compatibility Option support to the IDE, and is based on the Host Compatibility Option for Workbench. This chapter describes differences between the Workbench HCO and Mainframe Express Host Compatibility Option that might require you to make alterations in existing applications that you are migrating, or to change familiar methods of working.

To use this feature, you need to have installed Host Compatibility Option when you ran Setup to install Mainframe Express. Setup does not offer you this option by default - you must run Setup with the /hco command line parameter to make this option appear on Setup's Options Screen in place of SQL Option for DB2.

15.1 Overview

Host Compatibility Option in Mainframe Express enables you to access IBM DB2 databases on the mainframe and to create DB2-compatible databases on your workstation.

Mainframe Express supports Host Compatibility Option only for emulating DB2. It does not support Oracle, Sybase and Informix.

15.2 Details

This section advises on what to use where a feature in Host Compatibility Option for Workbench is not in Mainframe Express or has changed. Where we believe you can continue using a feature without change, it is not mentioned. This book does not cover enhancements.

15.2.1 Flagging EXEC SQL in a Copybook

Ability to flag EXEC SQL specified in a copybook rather than an EXEC SQL INCLUDE.

Status in Mainframe Express:

Not included. The mainframe SQL preprocessor will not convert any SQL statement that is in a copybook. However some user-written and third party preprocessors do convert these statements.

15.2.2 SQL Directive

Directive to enable support for IBM DB2 databases.

Status in Mainframe Express:

Replaced by the DB2 directive. You must have installed Mainframe Express's Host Compatibility Option to provide the support.

To migrate your application:

Workbench has new and old forms of the SQL directive, for example SQLDB(SAMPLE) and SQL(DB=SAMPLE), which are equivalent. The DB2 directive in Mainframe Express uses the new form, for example DB2(DB=SAMPLE).

15.3 Frequently Asked Questions

This section answers questions that may arise in the course of migrating.

15.3.1 Why does NLS data I stored in DB2/2, using the HCO add-on to Workbench, sometimes appear wrong in Mainframe Express?

Mainframe programs expect EBCDIC data, but DB2/2 stores data using the PC character set. So Host Compatibility Option converts between the two character sets whenever you access a database. But the HCO add-on to Workbench and Host Compatibility Option in Mainframe Express use different PC character sets - the former uses ASCII and the latter uses ANSI. These two character sets are mostly the same, except for some special characters and NLS characters.

If you come across this problem, you need to convert your DB2/2 data from ASCII to ANSI. You can use a standard utility, DSNTIAUL, provided with Host Compatibility Option for importing data from EBCDIC and exporting to EBCDIC. Use it as follows:

  1. In Workbench+HCO, use DSNTIAUL to export the DB2/2 table containing your ASCII data.

    This converts the data from ASCII to EBCDIC.

    If the data that appears wrong is used in key data or sort sequences, the database and tables must be re-created. If not, you can skip steps 2 and 3.

  2. Create a new database using Mainframe Express+Host Compatibility Option - click HCO on the Tools menu, then click Create Database and use the Micro Focus codepage.

    This causes DB2 to use the Micro Focus ANSI codeset for all sorting and result sets where data is collated.

  3. Re-create the tables in the database using Mainframe Express+Host Compatibility Option - click HCO on the Tools menu, then click DDL Processor.

  4. In Mainframe Express+Host Compatibility Option, use DSNTIAUL to import the dataset produced.

    This converts the data from EBCDIC to ANSI.

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

PreviousMigrating from XDB Migrating from MF/370 AssemblerNext"