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 Determining the Build Status of a Source File

When Mainframe Express updates the build status of a source file, it performs the following three operations:

  1. Update source files

    Mainframe Express first looks for each source and dependency file in the project along each of the folders specified for the relevant search path in the project. New versions are added if found, and old ones removed if they no longer exist. The date and time on each source file is stored in the project.



  2. Update output files

    Mainframe Express next looks for all possible output files from each source file along each of the folders specified for the relevant search path in the project. New versions are added if found, and old ones are removed if they no longer exist. The date and time on each output file is stored in the project.



  3. Update status on each file

    When a source file is compiled, the dependent files (such as copybooks) are linked to the main source file. This link also includes the date and time of the dependent file when the compilation occurred. Immediately after compilation, Mainframe Express examines each of the possible output files, and determines which has the latest date and time. It then stores this date and time as the Date Compiled attribute of the source file.

    The status of a file is set to Out of Date if any of the following are true:



2.4 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. Generated COBOL (.gnt file).
  2. Intermediate COBOL (.int file).
  3. Assembler (.390)

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

2.5 When Projects are Saved

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


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