Once you have ensured your programs compile cleanly in the Visual COBOL environment, you can create a project for them so that you can take full advantage of all of the benefits offered by the Eclipse debugging environment. You need Visual COBOL for Eclipse installed on your local Windows machine and you need to create a connection in it to the remote UNIX machine.
From your local installation of Visual COBOL create a new remote connection to Visual COBOL Development Hub on the UNIX machine which has your existing COBOL programs. See Creating connections to remote hosts in this product help.
You need to create a project that will store the source files on the remote machine:
If this is the first time you have started Visual COBOL you see the Welcome page in the IDE. You can also open the Welcome page by clicking Help > Welcome.
In this perspective, Eclipse offers you the views and commands that are best suited for COBOL development.
Choose the remote connection to use and follow the instructions to create a remote native COBOL project in a directory on the remote machine.
Add the source files on the remote machine to your project as follows:
This adds the files to your project and, if Eclipse uses the default settings, starts a build. You might need to set some Compiler directives to resolve any compilation issues, similarly to when you resolved any issues when compiling from a terminal window.
To configure your project and specify any Compiler directives:
If your source code contains tab stops, compilation might fail, because although a COBOL tab is eight characters long, the IDE's tab is four characters long, and lines of code might be starting in the sequence number and indicator areas section (columns one to seven) of the program instead of from column eight.
You can fix this problem using the SOURCETABSTOP(n) Compiler directive, where n is the number of space characters by which to expand tab characters during compilation.
By default, Eclipse builds your source files each time you make a configuration change or add or edit the files. If you have changed this preference, to build the project click Project > Build Project.
To add existing copybooks to your project, right-click the project and use the Import > Import command.
Copybooks are not compiled at build time and the files' Build Action property is automatically set to None. (You can also set this property for COBOL source files to keep a file in the project but not include a built version in any output.)
By default, Visual COBOL identifies files as copybooks by their .cpy extension. You can specify other file extensions as copybooks in the IDE preferences - click , click COBOL Copybook and add any new file associations using this dialog box.