Compile a single file from the command line using ANT, using the COBOL build file
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.