contents.gifindex.gifprev1.gifnext1.gif

A.4.4 Running Your Programs

After a successful compilation, the resultant object file is ready for immediate execution (there is no link step). To run your program make a note of the full path to your object file and return to the Windows desktop or Program Manager.

There are a variety of ways to run your program under Windows. The three basic methods are:

gt490000.gif by selecting Run from the Program Manager's File menu (16-bit Windows), or from the Start menu (32-bit Windows).

gt490000.gif by placing an icon for each program in a Program Group or folder, and then starting the program by double-clicking its icon.

gt490000.gif by giving your COBOL object files 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 the File Manager or Windows Explorer, or most Windows file system navigation utilities.

In this appendix only the first option, running your program from the Run command line dialog box, is described. The advantage of using the Run dialog is that it requires no special setup. However, it is a time-consuming method because you must type the command line options every time you execute the program. For the greatest convenience to the end user it is best to set up a program icon. To set up an icon, or to create a file association to the runtime, please refer to your Windows documentation.

IMPORTANT

If you plan to run multiple instances of the runtime simultaneously in a 16-bit Windows environment, you must execute "SHARE.EXE" before starting Windows.

To start the Run dialog, select Run from the Start menu, or from the File menu of the Program Manager.

In the entry box, type the name of your ACUCOBOL-GT Windows runtime. The default name is wrun32.exe under 32-bit Windows, and wrun16.exe under 16-bit Windows. If you changed the name of the runtime executable, enter that name. Follow the name of the runtime with any desired runtime options and the full path and name of the COBOL program you want to run. Note that if you didn't add ACUCOBOL-GT to your path, you will need to specify the full path to the runtime (for example: c:\acucbl43\acugt\bin\wrun32.exe). After you have entered the complete command line, click OK to execute the program.

Note: 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.