To add files to a COBOL project

To create and new files to the project:

  1. Right-click the project in Solution Explorer and click Add > New Item.
  2. In the Add New Item dialog box, click Show All Templates.
  3. Under Installed, select any of the COBOL items in the available categories and click Add.

To add existing files to the project:

  1. Right-click the project in Solution Explorer and click Add > Existing Item.
  2. Navigate to the folder that contains the files you want to add to the project.
  3. Set the file type filter to the type of files you need to add.
  4. Select the files to add and either click Add to add them to the project and create copies of them in the project directory, or click Add As Link to link to the files from the project while keeping them in their original location.

To add existing COBOL files and copybooks to the project and perform a scan to determine and set build directives as required:

  1. Ensure any file extensions that are not traditionally associated with COBOL will be recognized as COBOL programs or copybooks.

    Read To associate file extensions with COBOL and To specify that a file extension is a copybook for details.

  2. In Solution Explorer, right-click your project.
  3. Click Add Existing COBOL Items.

    This opens the Add Existing Files To Current Project dialog box.

  4. Select the folders that contain the files to add to the project as follows:
    1. Click Add.
    2. Browse to the folder that contains the source files and select it.
    3. Click Select Folder.
    4. Ensure Add subfolders is checked if you want to add files from all subfolders.
    5. Repeat to add other folders as needed.
  5. Ensure File types to add to the project lists the file extensions that you want to add to your project.
  6. Check Add copybooks to Solution Explorer to display the copybook files as part of the project in Solution Explorer.
  7. Click Finish.