The source files of the demonstration application are stored in subfolders named after the file type (for example, bms, cbl, copybook, jcl) in the C:\MFETDUSER\Bankdemo\Sources directory.
You use the BankDemo project supplied with the sample to create your project in the Eclipse workspace that has the same settings as the sample project:
This creates a copy of the Bankdemo project in your Eclipse workspace and adds the project to the application in the Application Explorer view. If the Bankdemo project entry is not displayed in the tree view, refresh the Enterprise Development Projects entry.
Your project is pre-configured so that the build process creates the output files in a location that is used by the Enterprise Server logical server. To check which folder will include the built files:
In most cases, to add files to an Eclipse project, you use the Import command. This creates local copies of file sources in the workspace. Optionally, you can leave the source files in the original location and create links to them. To do this:
This adds the folders storing the source files to your project as linked resources:
By default, Eclipse is set to build projects automatically (see
), so it immediately compiles the files you have just added.Check the Console and Problems views and see that some of the programs failed to compile. In Application Explorer view, you can select a program and check the error and warning count property in the Properties view to indicate that there are compilation problems.
The errors are due to the correct copybook paths not being specified in the project properties.
To perform a scan of the COBOL programs in your project to determine and then set the appropriate Compiler directives:
The IDE performs a scan of the files and shows a report of what directives for dialect and for CICS must be set on the programs in your project in order for them to compile cleanly.
If you are prompted to delete some user files, choose No.
Setting the missing Compiler directives triggers a full rebuild of the project. There are still some errors in the COBOL sources due to the fact that the project cannot resolve the paths to the copybook files.
To specify the copybook paths for the project:
Eclipse rebuilds the project and now all COBOL programs should compile cleanly.
The demonstration application includes a number of data files used. To see how you can edit data files, you only need to look at one of these files so you do not need to add a folder for it to the project. To add the data file to your project:
This adds the file to the Bankdemo project and also automatically opens it in the Micro Focus Data Files Tools utility. You can close the utility for now.
You created an Eclipse project and added references in it to the COBOL files, the copybooks, the BMS and the JCL files of the demonstration program.
Next, you are going to edit some of these source files.