Created On: 17 October 2012
Problem:
You can use ANT to compile COBOL Files from the command line in Visual COBOL for Eclipse, but how can this be done for individual COBOL programs?
Resolution:
First ensure your COBOL environment is set up and ensure the mfant and ant-contrib jar files (from the Visual COBOL bin directory) are on your classpath.
Assuming your project is in c:\workspace\fred, your build configuration is called “New Configuration”, and you want to compile program1.cbl and program2.cbl, use the following command line:
ant -f .cobolBuild New_Configuration.FileCompile -DfilesList="C:\workspace\fred\program1.cbl,C:\workspace\fred\program2.cbl "
You can modify the entries in the -DfilesList parameter as needed.
NA.