In this section you create a COBOL program. This file is created from the sample archive file that you downloaded previously.
- Right-click the
CobolBook project in COBOL Explorer, and click
New > COBOL Program.
- Ensure that the
Source folder field contains
CobolBook/src.
- Ensure that the
Package field contains
com.microfocus.book.
- Type
book.cbl in the
Name field. Click
Finish to create the COBOL program.
- The file opens in the COBOL editor view with some skeleton text. Replace the entire contents of the program with the downloaded copy of
book.cbl.
- Click
File > Save. The project is built.
In addition to building the project, the compilation generates a class file,
BookLegacy.class, which interacts with Java, and is located in the
bin folder.
The
bin folder is not the correct location, and, as such, the program will not execute successfully. You need to correct this problem by setting the COBOL Compiler directives.