


The ACUCOBOL-GT compiler is most easily used via the MS-DOS command line. This approach is described below. It is also possible to use the Run dialog to compile, or to establish an association between your source files and the compiler executable, or to set up one or more icons to compile individual files. But these approaches are typically more cumbersome and inflexible compared to the DOS command line. For information regarding creating file associations and setting up icons, see your Windows documentation.
To open a DOS window, double-click on the MS-DOS icon in the "Main" program group of the Program Manager, or click on the Start button, place the mouse pointer on "Programs" and click on "MS-DOS Prompt". In the DOS window, change directory (CD) to the directory containing your source files. Verify that the ACUCOBOL-GT compiler is in your PATH by typing "ccbl32 -v" and <enter>. The compiler will execute, returning the name and version number of the compiler. If the system returns "Bad command or file name," you didn't add the location of the compiler to your PATH, or you haven't rebooted since installing the software. You can check the current definition of PATH by typing "path" and <enter>. You can add the location of the compiler ("c:\acucbl43\acugt\bin", by default) to your PATH by editing the PATH definition in your "autoexec.bat" file and rebooting. Or you can use the compiler by typing the full path and program name each time you compile ("c:\acucbl43\acugt\bin\ccbl32.exe", by default).
Once you have verified that the compiler is in your PATH (or you have decided that you will specify the full path every time you compile), you are ready to compile your programs. A complete list of compile options is located in Book 1, section 1.2. Also, a complete list of switches is displayed by running the compiler with the "-help" option ("ccbl32 -help").
One commonly used switch is "-o". This switch is used to specify the name of the output object file. Note that ACUCOBOL-GT uses the naming convention ".cbx" to indicate an ACUCOBOL-GT executable file. If "-o" is not used, the compiler will name the file "source-name.acu". If your source includes COPY files, you can either copy the COPY files to your current working directory or specify their location with the "-Sp" switch followed by the complete path of one or more directories. A typical compilation command might look like:
ccbl32 -Sp c:\work\lib -o sample.cbx sample.cbl