Chapter 3: Accessing Mainframe Files

This chapter describes the features available in Mainframe Express that enable you to access mainframe-based files from your Mainframe Express projects. The section below shows how you can configure Mainframe Express to work with files while they are still on the mainframe, while the section Downloading IMS Databases describes the steps involved in moving an IMS database from a mainframe to a PC.

3.1 Using Mainframe Access

Mainframe Access is a suite of Micro Focus tools that enables you to access files residing on a mainframe. Mainframe Express includes the client software for Mainframe Access, so if you have installed the Mainframe Access server software on your mainframe, you can use Mainframe Express projects to access mainframe files as easily as PC files.

Before you can access mainframe files using Mainframe Access, you need to have installed and configured a number of options. You must perform the following operations:

3.2 Downloading IMS Databases

The process of downloading an IMS database from a mainframe to a PC consists of three stages:

  1. On the mainframe, unload the database to a sequential file.

  2. Transfer the sequential file to the PC.

  3. On the PC, load the database from the sequential file.

These stages are described in the following sections.

3.2.1 Unloading the Database

You must unload the IMS database into a sequential file with variable-length records. The file must contain one record for each segment and each record must contain the record length, segment name, and segment data in fixed positions. Two utilities for creating a suitable sequential file are: IBM Unload Utility

The standard IBM unload utility creates a sequential file with a variable-length record for each segment. In each record, the segment name begins in position 7 and the segment data begins in position 36. IMSDBUV Utility

The IMSDBUV utility is supplied with Mainframe Express. You can transfer it to the mainframe where it runs in IMS/ESA as a batch program. It retrieves segments from a database. For each segment, it creates a variable-length record containing record length, segment name, and segment data.

IMSDBUV can also add header and trailer records to the file to describe the file's contents and, for example, the compression routine used.

3.2.2 Transferring the Sequential File

You can use the Mainframe Access Drag and Drop facility to download and automatically load the IMS database for you, as follows:

  1. Right-click on the variable-length sequential file generated by unload.

  2. Set the type to unloaded IMS database.

  3. Drag the data set to the PC side of the Drag and Drop display. This performs the download and reload of the database.

Alternatively, you can use any file transfer utility that supports binary file transfer to transfer the sequential file to the PC. A binary file transfer does not perform conversion from the EBCDIC character set to ANSI and does not add carriage return or line-feed (CR/LF) record delimiters.

3.2.3 Loading the Database

If you have used the Mainframe Access Drag and Drop facility to download the IMS database, the reload has already been done.

If you used another file transfer utility, you can use the IMSDBU utility that is supplied with Mainframe Express to load the database from a variable-length sequential file. To use IMSDBU from the Mainframe Express IDE, do the following:

  1. On the Tools menu, click IMS.

  2. Click Database Utility. An ISPF-style screen is displayed.

  3. Enter L for the function and the database name.

For more information, see the section IMSDBU - Data Management in the chapter Developing IMS Applications in your User's Guide.

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