Top
NetCOBOL V11.0 NetCOBOL Studio User's Guide
FUJITSU Software

3.1.1 The role of the Dependency view

The "Dependency" view displays dependencies within a project.

Note

The structure of COBOL source files and the class structure of a COBOL class repository are displayed in the "Structure" view.

The following folders are created in the "Dependency" view when a COBOL project is created:

Source Files folder

The Source Files folder specifies the files to be compiled in the project. The files displayed in this folder are compiled and linked at program build time. Files with .cob, .cbl, and .cobol extensions are treated as COBOL source files and compiled by a COBOL compiler. Files registered as precompiler input source are called by the precompiler command before compilation. Files with the .rc extension are compiled only when the resource compiler has been added as a build tool to the project.


The files in the Source Files folder are compiled in the order displayed, with the dependencies of the files taken into consideration. To change the position of a file in the compilation order, select the file, and use or on the toolbar to move the file up or down, respectively.

For COBOL source files in the Source Files folder, the following folders are displayed according to the contents of the files or specified options:

These folders are used to automatically determine the compilation order of the COBOL source files.

Note

  • To specify the name of a COBOL source file to register, specify a name that is different from the name of any other COBOL source file. If a COBOL source file with the same file name but a different extension is registered in the Source Files folder, an error occurs during build.

  • Files registered in the Source Files folder with the extensions ".cobol" and ".cob" are treated as COBOL source files. Files with the extension ".cbl" are treated as library files.

  • Of the COBOL library and descriptor files registered in the Dependent Files folder, only those within the project are transferred to the server during remote development. Files in other projects, and COBOL library and descriptor files managed in other folders, are not transferred. The only library files transferred to the server are those with the extension ".cbl".

Linking Files folder

The Linking Files folder specifies the library files (.lib) and object files (.obj) to be linked at build time. The object files to be generated from the COBOL source files specified with the Source Files folder need not be specified.

Other Files folder

Files that are in the project but registered in neither the Source Files folder nor the Linking Files folder are displayed in the Other Files folder.

Point

Operations involving files in the "Dependency" view are reflected in the "Structure" view.

3.1.1.1 Adding a COBOL source file in the Dependency view

For a COBOL source file in a project

Follow the steps below to add a COBOL source file to the project.

  1. Select the "Source Files" folder in the "Dependency" view.

  2. Select "Add File..." from the context menu.

  3. The "Add Source Files" dialog box for the selected project appears.

  4. Select the file to be added to the "Source Files" folder.

  5. Click the "OK" button. The selected COBOL source file is added to the "Source Files" folder in the "Dependency" view. The addition of that added file is reflected in the "Structure" view.

For a COBOL source file that is not in a project

Either of the following methods can be used to add a COBOL source file that is not in the project:

  • Using Explorer in the Windows system, select the COBOL source file to be registered, and then select "Copy" from the context menu. Select the "Source Files" folder, and select "Paste" from the context menu.

  • Using Explorer in the Windows system, drag and drop the COBOL source file into the "Source Files" folder.

To add a link file:

  1. Select the "Linking Files" folder to which the file is to be added.

  2. Select "Add File..." from the context menu. The "Open" dialog box appears.

  3. Select the file to be added to the "Linking Files" folder.

  4. Click the "Open" button. The selected file is added to the Linking Files folder in the "Dependency" view. The addition of that added file is reflected in the "Structure" view.

3.1.1.3 Adding a dependent file

To add a dependent file:

  1. Select the "Dependent Files" folder to which the file is to be added.

  2. Select "Add File..." from the context menu. The "Open" dialog box appears.

  3. Select the file to be added to the "Dependent Files" folder.

  4. Click the "Open" button. The selected file is added to the "Dependent Files" folder.

3.1.1.4 Deleting a dependent file

To delete a dependent file:

  1. Select the file to be deleted from the "Dependent Files" folder.

  2. Select "Delete" from the context menu.

  3. Click the "Yes" button when the file deletion confirmation message is displayed. The file is deleted from the "Dependent Files" folder.

Note

The file is deleted only from the "Dependent Files" folder. Even though the file is deleted from the "Dependent Files" folder, it is not deleted from the disk.