A preprocessor is written as though it were always called without the compiler by a command line. In particular, every preprocessor must accept at least the following command-line options:
-e file | causes error messages to be written to the specified file. This option must be followed by the name of the error file. |
-help | do not preprocess; show command-line help on standard output device |
-Pofile | causes preprocessor output to be written to the specified file. This option must be followed by the name of the output file. |
-Sa | indicates that the input file is ANSI format COBOL |
-Sd | instructs the preprocessor to include lines marked as debugging lines ("D") in the indicator area |
-Si | instructs the preprocessor to include lines based on pattern. The next separate argument is the pattern to match. |
-St | indicates that the input file is terminal format COBOL |
-Sx | instructs the preprocessor to exclude lines based on patter. The next separate argument is the pattern to match. |
-v | do not preprocess; show preprocessor version information on standard output device |
A preprocessor should accept these options in any order. A preprocessor must honor the -e, -placePo, -help and -v options. Other options need not be honored but must be scanned if they appear on the command line.
Another command-line option is highly recommended:
-n | indicates to the preprocessor that no preprocessor directives should be included in output. A standard preprocessor output includes directives, which may make the output very difficult to read. If you want to examine the output of a preprocessor, this option lets you suppress the directives and receive clean output. See Line and File Directives for more information on directives. |
The preprocessor should abort with an appropriate error message if a required option is missing.