PreviousCompiling COBOL Programs Mainframe UtilitiesNext"

Chapter 2: System Intelligence

Your project can contain a variety of file types such as COBOL source, CICS mapset definitions, IMS data definitions, Data Files and Assembler code. See the section File Types and Dependencies for more information. These files can be built into an executable project. Mainframe Express saves a project whenever significant changes have occurred. See the sections Building Your Project and When Projects are Saved for more information.

When Mainframe Express builds a project, it uses built-in system intelligence to determine:

Mainframe Express also uses system intelligence at run-time, to identify which module to load.

2.1 File Types and Dependencies

When you create a project or you add a source file to a project, Mainframe Express scans the project for dependencies (copybooks etc.). It adds these additional files to the project automatically. While doing the scan for dependencies, Mainframe Express also looks for selected phrases to try to determine the type of file, for example EXEC CICS. These set the relevant project settings, in this case that the CICS preprocessor must be used.

The following is a list of the file types and default file extensions currently supported:

File Type
Default Extension
Assembler source file
.mlc, .asm, .bal, .cap
Assembler macro file
.mac
BMS include file
.inc
BMS mapset .bms
Card file .ctl
COBOL copybook .cpy
COBOL source file .cbl, .cob
Data file .dat
IMS DBD file .dbd
IMS MFS file .mfs
IMS PSB file .psb
JCL file .jcl, .job
Link file .lin
Proclib File .prc
REXX exec .rex
SQL DDL/DML file .sql
.ddl
.dml
TSO CLIST .tso

You can also create your own file extensions and assign file types to these extensions. See the section Creating a Project in the chapter Using Projects in your User's Guide

2.2 Building Your Project

Building a project is the process of converting source code to executable code. Typically, building an application involves:

When you come to build your project, the build order is important. For example, the CICS BMS compile must take place before the COBOL compile for the program which uses the copybook produced by the BMS compile. There are a variety of ways of rebuilding the application:

2.2.1 Complete Rebuild

Selecting Rebuild All on the Build menu causes the entire project to be rebuilt (whether or not the files have changed since the last build). Mainframe Express automatically builds the various components in the following order:

  1. IMS DBD
  2. CICS BMS
  3. Assembler - not autolinked
  4. Assembler - autolinked
  5. COBOL
  6. IMS MFS
  7. IMS PSB
  8. JCL
  9. Linker

2.2.2 Rebuild Using Changes Only

When you select a rebuild by choosing Build > Build, Mainframe Express rebuilds only those targets with changes in their source files. The build system checks which files have changed, the dependents of those files (the "targets") and then scans all the dependencies of those targets to see if any of the sources for a given target have been updated or any new dependencies have been added. Where a target is out of date for any of its dependencies, a compile command is issued (where that compile may turn out to be a COBOL compile, BMSGEN or whatever).

In detail, the build system performs the following sequence of steps:

  1. It updates the status of each main source file; in other words, it works out which files need rebuilding.

  2. It rebuilds all files that have a status, except failed files where Rebuild "Failed" files is unchecked. (You can find this setting on the Build page of the General page in the Project Settings dialog box). For a complete list of file statuses, see the section File Details Viewin the chapter The Mainframe Express Interfacein your User's Guide

  3. It checks any files that were rebuilt in step 2 to see if they have become out-of-date as a result of step 2, for example, in step 2 it built a BMS file that generated a copybook included in a COBOL source file that it did not build.

  4. It repeats step 3 for any files that became out-of-date as a result of step 3.

Mainframe Express uses the same order of building as in the case of a complete rebuild.

2.2.3 Manual Rebuild

You can rebuild one file or several files:

2.3 Precedence for Load Modules

When one module in a mixed-language application calls another, Mainframe Express looks for the module to load in a specific order:

  1. COBOL (.gnt or .int)
  2. Assembler (.390)

This takes care of the situation where there is a COBOL module and an Assembler module of the same name: Mainframe Express finds and loads the COBOL module first.

2.4 When Projects are Saved

Mainframe Express saves a project file (.mvp) when you do any of the following:


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

PreviousCompiling COBOL Programs Mainframe UtilitiesNext"