After a successful compilation, the resultant object file is ready for immediate execution (no link step is required). To
run your program, make a note of the full path to your object file and return to the Windows desktop.
There are a variety of ways to run your program under Windows. The basic methods are:
- Running a command from the
Start menu.
- Placing an icon for each program in a Program Group or folder, and then starting the program by double-clicking its icon.
- Naming your COBOL object files with a common file extension and then associating the extension with the runtime. After the
association is established, you can run a program by double-clicking on the name of the file as it appears in Windows.
- Using the
wrun32 (or
crun32 if you are using the console runtime) command at the command prompt.
This document describes how to run a program from the
Start menu only (although, the command line option is almost identical). The advantage of this method is that it requires no special
setup. However, it is more time-consuming (than other methods) because you must type the command line options every time you
execute the program. For greater convenience, it is best to set up a program icon: to do this, or to create a file association
to the runtime, please refer to your Windows documentation.
- Click the
Start button.
- On the Start menu, in the entry field, type the name of your ACUCOBOL-GT Windows runtime.
The default name is
wrun32.exe. If you changed the name of the runtime executable, enter that name.
- Following the name of the runtime, enter any runtime options required, followed by the path and name of the COBOL executable
program you want to run.
- After you have entered the complete command line, press
Enter to execute the program.
Note: If you did not add the
\bin directory path to the PATH system environment variable (typically, that is:
c:\Program Files\Micro Focus\extend
xxx\AcuGT\bin), you will need to specify the full path to the runtime (c:\Program Files\Micro Focus\extend
xxx\AcuGT\bin\wrun32.exe) each time in the command (and not simply
wrun32.exe).
You can use the COBOL configuration variable DEFAULT_PROGRAM to specify the name of the program to execute when no program
is specified on the command line. See
Appendix H in the ACUCOBOL-GT documentation set for more configuration information.