


In many ways, the 32-bit Windows environment operates quite differently from other environments. Included in these differences are memory access methods, interfaces to other languages, file extensions, and hardware error messages. Some of these could affect the way your programs execute.
As an example, this section highlights important differences between the operational characteristics of the MS-DOS runtime and the 32-bit Windows runtime.
Memory
1. A 32-bit Windows program may access more than 640K.
Some memory is used by 32-bit Windows, some by system software, and some by other active applications. You should be able to run programs substantially larger than you can under MS-DOS, but establishing exact memory availability is difficult due to the highly dynamic nature of 32-bit Windows. The ACUCOBOL-GT runtime for 32-bit Windows is designed to handle memory management issues for you automatically.
SYSTEM
2. The "SYSTEM" library routine operates differently. You may use it to initiate both MS-DOS programs and 32-bit Windows programs. In either case, the program you start will run in its own window.
While it's running, the window containing the calling program will not accept input from the user. For MS-DOS programs, the "PIF" file for the called program will determine how it runs. (See the 32-bit Windows documentation for information on PIF files. PIFs tell 32-bit Windows how to use DOS programs.)
When CALL "SYSTEM" is used to initiate a program, it looks only for files with a ".EXE" extension. If you want to call a ".COM" or ".BAT" file, you must explicitly add that extension in your code. For example:
CALL "SYSTEM" USING "MYBATCH.BAT"
C$SYSTEM
3. The "C$" library routine allows you to run other programs from inside a COBOL application by combining the functionality of the "SYSTEM" and "C$RUN" routines. See Appendix I for details.
ACCEPT SYSTEM-INFORMATION FROM SYSTEM-INFO
4. ACUCOBOL-GT for 32-bit Windows returns "WIN/NT" as its host operating system when you use the ACCEPT FROM SYSTEM-INFO verb. This allows you to code 32-bit Windows-specific sections in your programs easily. "Acucobol.def" contains SYSTEM-INFORMATION data items.
Assembly routines
5. Assembly routines cannot be linked into the 32-bit Windows runtime.
Hardware errors
6. Hardware errors returned by 32-bit Windows are different from those returned by MS-DOS. This causes the secondary codes given by error "30" to be different under 32-bit Windows and MS-DOS.
C$CHAIN
7. The 32-bit Windows version of C$CHAIN has a side-effect that you should be aware of. 32-bit Windows does not provide a mechanism for "chaining" programs. Instead, we initiate the chained-to program as an independent program and then halt the chained-from program.
Although this has the correct effect, 32-bit Windows causes the "active" program to shift from the chained-to program to some other program when the chained-from program halts. It is impossible for the runtime to determine which program will be selected by 32-bit Windows as the "active" one.
The net effect is that the chained-to program pops up, but then becomes inactive and must be reactivated with either the mouse or the keyboard in order for the user to enter data. 32-bit Windows does not provide any mechanism for suggesting which program to activate when a program halts.