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
Linking Files folder
Other 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:
The repository file that is generated when COBOL source files are compiled are automatically analyzed and displayed when the COBOL source files are saved. The generated repository file corresponds to the class defined in the COBOL source files. The name of the generated repository file is "class-name.rep". The repository file displayed in this folder is used to automatically determine the compilation order of the COBOL source files. It is also used to search for files that must be compiled when they are updated.
The Dependent Files folder specifies the files on which COBOL source files depend. It also specifies the libraries referenced by the COBOL source files or the repository files of classes referenced by the COBOL source files. The files specified with this folder are used to automatically determine the compilation order of the COBOL source files. They are also used to search for files that must be compiled when they are updated. To add files, select "Add File..." from the context menu. Executing "Analyze Dependency" from the context menu enables the COBOL source files to be automatically analyzed, and files on which they depend to be added.
The Target Object Files folder is displayed when "Specify Target Object Files" is selected from the context menu. The object files to be generated from COBOL source files are displayed. The object files displayed in this folder are to be linked. The displayed object files are updated when the COBOL source files are saved.
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".
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.
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.
Follow the steps below to add a COBOL source file to the project.
Select the "Source Files" folder in the "Dependency" view.
Select "Add File..." from the context menu.
The "Add Source Files" dialog box for the selected project appears.
Select the file to be added to the "Source Files" folder.
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.
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:
Select the "Linking Files" folder to which the file is to be added.
Select "Add File..." from the context menu. The "Open" dialog box appears.
Select the file to be added to the "Linking Files" folder.
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.
To add a dependent file:
Select the "Dependent Files" folder to which the file is to be added.
Select "Add File..." from the context menu. The "Open" dialog box appears.
Select the file to be added to the "Dependent Files" folder.
Click the "Open" button. The selected file is added to the "Dependent Files" folder.
To delete a dependent file:
Select the file to be deleted from the "Dependent Files" folder.
Select "Delete" from the context menu.
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.