Using Common COBOL Copybooks in Visual COBOL for Eclipse
In Visual COBOL for Eclipse, how do I make a copybook in one COBOL project available to other COBOL projects?
Instead of having the copybook in a COBOL project, place the copybook into a COBOL Copybook project. Here are the steps:
- In Visual COBOL for Eclipse, create a project of type "COBOL copybook", named for example, "my_copybooks".
- From the menu, select File -> New -> COBOL Copybook Project, and enter a name for the project
- Move desired copy file(s) from an existing COBOL project into "my_copybooks" project
- Select the copy files in the COBOL project using CTRL-Click
- Drag the selected files to the new COBOL Copybook project
- Add reference to "my_copybooks" project in each COBOL project that needs to access the copybook
- In each COBOL project, go to Project Properties -> Micro Focus -> Build Path
- Choose the "Projects" Tab
- Click "add" button to add a reference to another project
- Choose the "my_copybooks" project
Instructions tested with Visual COBOL for Eclipse 3.0