Running Your Programs

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:

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.

  1. Click the Start button.
  2. 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.

  3. 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.
  4. 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.