Rational Developer for System z

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:

Linux icon Rational® Developer for System z® does not support local COBOL or PL/I builds, syntax check, or show dependencies on the Linux platform.

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 has only 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
    The Remove -GET preprocessor has the following preprocessor options specified:
    • Preprocessor Description: Remove -GET
    • Preprocessor Name (fully qualified): C:\mypreprocs\preproc1.exe
    • Preprocessor Output File Name: ${resource_fn}_PP1.dek
    • Support Error Feedback: The check box is selected.
    • Error Feedback XML file Name: ${resource_fn}_PP1.xml
  2. Remove -INC
    The Remove -INC preprocessor has the following preprocessor options specified:
    • Preprocessor Description: Remove -INC
    • Preprocessor Name (fully qualified): C:\Program Files\IBM\SDP\bin\PPINCL01.exe
    • Preprocessor Output File Name: ${resource_fn}_PP2.dek
    • Support Error Feedback: The check box is selected.
    • Error Feedback XML file Name: ${resource_fn}_PP2.xml

Terms of use | Feedback

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