Build Actions
Build actions are steps taken depending on the Build option selected. See explanation.
Build All
We have not seen this yet, but our workspace can contain more than one project. If that is the case the build will happen on each project, using the rules defined previouly, in the introduction, about file changes.
Build Project
With more than one project available, just the currently selected project will be built, using the rules defined previously, in the introduction, about file changes.
Build Working Set
This is not used for the COBOL development.
Clean
Clean, deletes all the built files and then rebuilds the entire project or workspace as selected.
Compiling a single program
If you wish to compile just a single program, then right-click on that program and select Compile.
Build Automatically
For now we will stick with the default of Build Automatically switched on.
That will take away the ability to Build All and Build Project and Compile single program, since all the building will be done automatically as a changed file is saved.
COBOL Compiler Control
The Micro Focus COBOL compiler can compile many different COBOL dialects. It also provides the ability to compile COBOL containing EXEC CICS or EXEC SQL statements.
The control of the compiler is done through a series of "directives" passed to the compiler.
To get a full list of the directives available you will need to look in the COBOL help system. Do this by selecting Help, Help Contents and searching for "Directives" as shown.
The first time you do this will take some time. Subsequently it will be much quicker.
In our example Bankdemo application, we have pre-set the directives that are needed so there is nothing for us to do right now.
The directives can be applied at 2 levels:
- Project Level
- Component Level
Often the directives can be set just at the project level, which means that all Components in the project will use these directives. Sometimes we may have a component which needs compiling with different directives. In this case we can set the directives at the component level, which will override the project settings.
An example of this would be if most of the programs in the project were using Enterprise COBOL for z/OS, but a few were VS COBOL II. In this case we would set the project directives for Enterprise COBOL, but the individual programs as VS COBOL.
Typical language dialect variations are shown below, but other less commonly-used variations are also supported. To get a full list of the language variations available, you will need to look in the COBOL help system.
In the case of your Bankdemo application the directives have been set for you. To look at them at the project level, select Project, Properties, Micro Focus COBOL, Project Settings, COBOL. (as shown above)
You can see here that:
- The data character set is EBCDIC
- The COBOL dialect is set to Enterprise COBOL for z/OS
- The Source format is set to fixed (i.e. columns 7 thru 72)
- The Compile for debugging is turned on and the error level has been set as Level E
- You can see also that there are additional directives set for this particular project
- You will also see that you can set specific directives which relate to CICS and SQL
All these directives apply to all programs in the project. As stated earlier you can override these at the individual file level. To do this, select the program file you require. E.g. ZBANKPRT1.CBL and right-click on this and select Properties and COBOL
As you can see this is almost the same as the Project Properties and is used to override project level settings if required.
You must ensure that Enable file specific settings is turned on.
Pre and Post build events
It is possible to set events that will happen both before and after a build. This mechanism is selected from Project, Properties as shown below
You will see that a post-build event has been set up here. This will be discussed in a later thread.
Next: Compilation details
#MFDS
#EclipseCOBOLbuildactions
#EnterpriseDeveloper


