Importing the AirportDemo Sample

The AirportDemo application is a good example to use as it is structured in such a way that the application logic that you want to test is separate from the rest of the application (i.e. the main program runner and the interface code).

  1. From within the UnitDemo workspace, click File > Import.

    The Import dialog box appears.

  2. Choose General > Existing Projects into Workspace, and click Next.
  3. In the Select archive file field, click Browse, navigate to the location of your samples, select samples.jar, and then click Open.

    The default location for samples.jar is $COBDIR/demo.

  4. Click Deselect All.

    No projects are selected in the Projects pane.

  5. In the Projects pane, select AirportDemo.
  6. Select Copy projects into workspace.
  7. Click Finish.

    A copy of the project (not the original version) is added to the workspace. On UNIX platforms, there are a couple of settings that you must check/change to get the project to build successfully.

  8. Select the project in COBOL Explorer, and then select Properties from the Project menu.

    The Properties for AirportDemo dialog box is displayed.

  9. In the left-hand pane, select Micro Focus > Build Configurations, and then in the right-hand pane, click Manage Configurations.

    The project is supplied with two build configurations: one for Windows platforms and one for UNIX platforms.

  10. Right-click the New_Configuration_UNIX configuration and select Set selected as active, and then click Finish.

    The project is now set to use the UNIX-specific build configuration.

  11. In the left-hand pane, click Link, and then ensure that the Bitism field is set appropriately for your platform (for example, some platforms are 64-bit only, and so cannot build projects set to 32-bit), and then click Apply and Close.

    Any changes made to the properties invokes a build of the project again, which should be error free.