Resolving Include Files

When trying to resolve include files (copybooks, PL/I includes, JCL procedures, etc.), the CA parser uses different search methods that you can set in the Homonyms tab in Project Options. The three methods are described below.

Search all, use the provided paths as preference
If you choose this option, the parser will look at all folders trying to find names that match the included file. If only one match is found, it will use that file. If more than one match is found, the parser will take the following steps to resolve which of the matching include files is the one to use:
  1. It will check if one of the folders is listed under Search Path in the Homonyms tab in Project Options. The folder should be listed as the full path to the registered sources. It could be local or shared, for example:
    • local:

      C:\Sources\Data Center 1\DC1 Mainframe 1\SYS1.COPYLIB

    • shared:

      \\server\Sources\Data Center 1\DC1 Mainframe 1\SYS1.COPYLIB

  2. It will look for proximity of the included file to the including file in the source folder structure. First it will check the files that are in the same folder as the "including" source, then the files in the dependent folder, and then up the folder hierarchy.
  3. Finally, folder names will be matched and the "include" folder that has a name with a better match to the source folder name will be selected.
Search only in the provided paths
When this option is selected, only the paths specified in the Search Path list will be used as locations for looking for include files. As this option works on project level, you can configure each subsystem or application in a separate project, and then specify the copybook locations for each project. This option is useful when the number of applications/subsystem is not too big.
Search in common location and only the same subsystem
This option may help when there is a large number of applications/subsystems. It lets you use the folder structure in the file system to define the boundaries between subsystems and to restrict retrieval of include files based on the physical folder structure. If you choose it, you can put all the sources in a single project and thus you won't need to add a list of folders to search in. If you choose this option, you need to specify the following two paths:
Common folder
All common libraries need to be located inside the same root folder, for example: C:\Sources\Common. Files in folders located here will be "visible" to all programs being analyzed.
Subsystems root level
All subsystems need to have a common root folder, for example: C:\Sources\Subsystems. If you have two subsystems in this folder, one of them will not get copybooks from the other and vice versa, but they can both get copybooks from the common libraries folder specified in the Common folder field.
Note: The subsystems root level selection is checked first and then the common folder.