To turn the automatic build off:
The build in this case checks for any files that have changed and does two things:
The Micro Focus COBOL Compiler can compile many different COBOL dialect variations. It can also compile COBOL code that contains EXEC CICS or EXEC SQL statements. The Compiler is controlled through a series of "directives" which are passed to the Compiler at build time. You can set directives at either a project or component level.
Often the directives can be set only at the project level, which means that all component files in the project use them. Sometimes, you have a component which you need to compile with different directives. In this case, you can set the directives at the component level which overrides the project settings.
For example, most of the programs in your project could be using Enterprise COBOL for z/OS and only a few could use VS COBOL II. In this case, you would set directives for Enterprise COBOL for z/OS at the project level, and VS COBOL II at the respective COBOL programs.
The Bankdemo application already has the required Compiler directives set on the files. At build time, the IDE invokes the COBOL compiler to compile the sources and create a number of files. These "built" files can vary, but each COBOL program in the Bankdemo application compiles to produce the following three types of file:
File type | Function |
---|---|
.dll - dynamic link library | Effectively the executable module the Compiler creates for each program. |
.idy - debugger information | The file created by the Compiler which allows debugging of the module. |
.obj - object file | A temporary file the Compiler creates while producing the .dll. You can delete these files. |
In the same way as for COBOL, the BMS compilation is controlled both at project and at component level.
You can configure the IDE to create a fully expanded Compiler listing file during the build. The following is also an example of setting a directive at component level:
During the build, the Compiler produces a source listing file, ZBNKPRT1.lst, in a Listing subfolder in the project directory (C:\MFETDUSER\Bankdemo\Projects\Eclipse\Bankdemo\Listing in this case). The listing file includes a fully expanded source file together with some Compiler system information at the start and with any Compiler errors highlighted with asterisks. You can view this listing from within the IDE: double-click the .lst file in the Listing folder.
You can introduce some Compiler errors into one of the programs to see how the Compiler handles them:
The errors are underlined with red wavy lines and a colored bar is added to the left of each line that includes an error.
This triggers a build of the project which will also update the listing file. The messages in the Console view indicate that there are build errors.
This positions the cursor on the line that contains the COPY statement for this copybook.
This displays a message that the directory containing the copybook is not on the copybook path for the project.
This triggers a rebuild of the project which now compiles cleanly as it now locates the copybook.
The lines that include syntax errors are marked with asterisks (**).