Rational Developer for System z, Version 7.6

Using multiple local preprocessors

You can process your source files with multiple local, site-developed preprocessors.
You need to have defined a property group on a local or remote system.
Multiple local preprocessor support is available for the following compilation or syntax check operations:

You can specify up to 10 local preprocessors for a single build operation.

To define and enable multiple local preprocessors:

  1. Open a property group in the property group editor.
  2. Navigate to the Local Preprocessors tab of the Local COBOL Settings or Local PLI Settings page. This page contains two sections: the Preprocessors section shows all preprocessors that have been added the property group. There are two ways to work with this list:
    • Select the check box next to a preprocessor name to enable the preprocessor to execute before a compilation or syntax check operation. This action is called "selecting a preprocessor." The preprocessor is activated for execution only when the check box is selected.
    • Select the preprocessor name in the list to display the options set for it in the Preprocessor Options section. This action is called "highlighting a preprocessor."
    The Preprocessor Options section shows the options for the selected preprocessor. On this page, you can do the following tasks:
  3. Click Finish to save the changes you have made.
The source program mysource.cob has different synonyms for COPY. The programmer has written a preprocessor, named preproc1.exe, that processes –GET statements in the source. The output of that preprocessor is an XML file named mysource_PP1.xml and a DECK file named mysource_PP1.dek that is passed on to the next step.

The output file mysource_PP1.dek contains –INC statements that also need to be processed. The programmer chooses to use the –INC preprocessor that ships with Rational® Developer for System z® for the second preprocessor step. The output of that step is an XML file named mysource_PP2.xml and a DECK file named mysource_PP2.dek that is passed on to the compiler.

The compiler receives mysource_PP2.dek from the second preprocessor step. By now, the –GET statements and the –INC statements have been removed from the source and the DECK file being processed only has valid COBOL statements in it.

To set up the preprocessor steps in a property group for this scenario, the programmer adds two preprocessor definitions, in the following order, to the property group for compiling the source:
  1. Remove -GET
    Preprocessor options for a user-written preprocessor
  2. Remove -INC
    Preprocessor options for the include preprocessor

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)