Setup basic Command Line environment

To setup a COBOL compilation command you must first install Elastic COBOL within the Eclipse IDE.

Elastic COBOL is distributed as an Eclipse plugin.  Use the Eclipse Install New Software menu item to install or update the version of Elastic COBOL from either of the following sources:

This will install the Elastic COBOL compiler command lines in the Eclipse plugins directory.  You can link to them (Linux ln command), create Windows shortcuts or copy them to a new directory that you put on your execution path.  Assuming Eclipse is installed in the Program Files Windows directory and Elastic COBOL version v13.8.18 is in use, the following commands will create a "bin" directory and then place it on the path

mkdir %HOMEPATH%\bin
copy "c:\program files\eclipse\plugins\com.heirloomcomputing.ecd.core_13.8.18\elastic_cobol\bin\win64\x86_64\ecobol.exe" %HOMEPATH%\bin 
copy "c:\program files\eclipse\plugins\com.heirloomcomputing.ecd.core_13.8.18\elastic_cobol\ecobol.jar" %HOMEPATH%\bin 
copy "c:\program files\eclipse\plugins\com.heirloomcomputing.ecd.core_13.8.18\elastic_cobol\etrans.jar" %HOMEPATH%\bin 
copy "c:\program files\eclipse\plugins\com.heirloomcomputing.ecd.core_13.8.18\elastic_cobol\ECERR.TXT" %HOMEPATH%\bin 
set CLASSPATH=%HOMEPATH%\bin\ecobol.jar;%HOMEPATH%\bin\etrans.jar

The ecobol command can be integrated into automatic build systems such as make, ant or maven.  The command returns code 0 for compilations that result in only I (informational) or W (warning) messages.  It returns code not 0 for any E (error) or S (severe) messages.

You can setup more advanced command line aliases for Elastic COBOL that include separate Java compilation and build jar files from the resulting outputs.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk