


The compiler option "-Pg" is used to call a preprocessor written in any language that produces a directly executable object file:
-Pg "preproc-1 [options]"
Here preproc-1 is the name of the preprocessor's executable file. The compiler looks for this file first in the directory in which the compiler executable is located. We recommend that you place preprocessors in that directory. If you place them elsewhere, you need to provide a complete path specification. Under Windows, the compiler appends the extension .EXE automatically (if it is not already there).
The name of the preprocessor, and of any directories in its path, cannot contain spaces. Note that Windows creates a space-free alias for any name with embedded spaces.
If the preprocessor requires or permits special options that are not specified by the ACUCOBOL-GT interface, they must follow the preprocessor executable file name and must be separated from it, and from each other, by spaces or tabs.
If a preprocessor option contains embedded spaces, it must be enclosed in delimiters so that it will be recognized as a single option. Standard double quotation marks (". . . ") cannot be used for this purpose because they are used to enclose the preprocessor executable filename and its associated options. Therefore, two apostrophes (''. . .'') are used instead.
For example, the following option might be used to call a preprocessor:
-Pg "preproc -d ''x=:the quick brown fox'' "
Preprocessor written in ACUCOBOL-GT
Preprocessors written in ACUCOBOL-GT use extension ".ACU" by default and are not directly executable. In this case, options of a slightly different form are required:
-Pg "runtime preproc-2.ACU [options]"
runtime is the name of the ACUCOBOL-GT runtime executable file. By default, under Windows it is "wrun32", and under UNIX it is "runcbl". A path is usually not required because this file is normally installed in the same directory as the compiler's executable file.
preproc-2.ACU is the name and extension of the preprocessor, i.e., your ACUCOBOL-GT object file. The extension ".ACU" is required; it will not be added automatically. The runtime will look for this file in the current directory. If the file is elsewhere, it is necessary to include a complete path specification.
Rules regarding the use of options with this type of preprocessor are the same as for other preprocessors.