When you add an existing AcuBench program to a project, you are actually adding only the existing program structure file (PSF)
to the project. The COBOL source file (.cbl) and associated COPY files are not added. In addition, adding a PSF to a project creates a pointer, or logical association,
between the project and the PSF. It does not move or copy the PSF from its current location into the project directory.
As a result, when you add an existing PSF to a project, consider the following:
- If you have one PSF file in a central location, and that PSF is added to multiple projects, changes made to the program in
one project will overwrite changes made to the PSF in another project. In most cases, you should copy a PSF into your project
directory before adding it to a project.
- If you have manually added code to the COBOL source file associated with a PSF and want to preserve this code in the new project,
you must copy the existing .cbl file into the Source folder (or equivalent) for the new project.
- If you have manually added code to the .cbl file associated with a PSF and do not want that code to appear in your new project, do not copy the .cbl file. In this instance, the PSF acts as a sort of program template from which you can build a new program.
To add a program structure file to a project, use these steps:
- In the Structure view of the Workspace window, right-click the project to which you want to add the program and select Add Program from the pop-up menu. The Add Program to Project dialog is displayed.
- In the dialog, locate and specify the name of the program structure file that you want to add and click OK.
- To add the associated program file (.cbl), use the Add/Remove function.
To add a plain source file, use the Add/Remove Files function described in Adding an Existing Source File.