The COPYPATH Environment Variable

The value of the environment variable COPYPATH is used by AcuBench (and the ACUCOBOL-GT compiler) to search for COBOL COPY files. When AcuBench (or the compiler) needs to access a COPY file, it searches, from first to last, the directories specified in COPYPATH.

You can define COPYPATH to specify one or more relative or absolute directory paths. By default, COPYPATH is set to the relative paths of the project's screen, COPY, resource, report, and FD folders (%screendir%, %copydir%, %resdir%, %reportdir%, and %layoutdir%). It also includes the absolute path of C:\Program Files\Micro Focus\extend x.x.x\AcuGT\sample\def), which contains the ACUCOBOL-GT .def COPY files supplied with your system.

Note: A copy of these .def COPY files can also be found in the default samples directory, which is %PUBLIC%\Documents\Micro Focus\extend x.x.x\sample.

You can change the value of COPYPATH in one of two ways:

  1. Use the Environment tab of the Project Settings dialog box.
  2. Add new paths as you add new source files to your project.

    The exact method by which new paths are added when you add source files to your project is determined by the settings that you have chosen in the Environment > Miscellaneous category of the Tools > Options dialog box, discussed in Customize Your Working Environment. If both Automatically modify COPYPATH options are selected:

    • When you add a new source file and select the Automatically parse program for COPY files option, COPYPATH is updated each time a new COPY file directory is identified.
    • When you use the Copy Path button in the Add/Remove Files dialog box to indicate a new COPY file location, that path is added to the COPYPATH definition.

Special Notes on Changing COPYPATH

  • Use caution when changing the value of COPYPATH. Changing the value of COPYPATH can potentially affect every source file in the project. For example, if you change the definition of COPYPATH to remove a path that holds a COPY file needed by the project, some files may no longer compile.
  • If you add a path that holds a COPY file that has the same name as a COPY file in another directory that is also defined in COPYPATH, the COPY file used is the first COPY file found (the paths are searched from first to last).
  • If you have a file or set of files that need a special COPY directory setting that you do not want to add to the definition of COPYPATH, you can specify that path on a file-by-file basis using the Directories to be searched for COPY (Sp) option in the Source Options catalog of the Project Settings dialog box.