Compiling COBOL Programs | Mainframe Utilities |
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.
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:
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
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:
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:
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:
Mainframe Express uses the same order of building as in the case of a complete rebuild.
You can rebuild one file or several files:
You can rebuild a single file by simply right-clicking on the filename in the project list and clicking compile filename. Be aware that this simply compiles the chosen file. The build order has been determined by you and you should be aware of the sequence you are using and the possible incorrectness of this sequence.
You can choose several files to rebuild by selecting the files and right-clicking in the project list. Then click Compile x programs where x is the number of files that you have chosen to rebuild.
When one module in a mixed-language application calls another, Mainframe Express looks for the module to load in a specific order:
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.
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.
Compiling COBOL Programs | Mainframe Utilities |