Using the Preprocessor

Using the preprocessor is a two-step process:

  1. Write preprocessor statements to the source code of programs to be processed. See also Preprocessor Statements.

  2. Call the preprocessor for the programs to be processed. See Calling the Preprocessor below.

    The preprocessor

    • scans the source program for preprocessor statements and for certain other statements. See the section Creation of XRef Data.

    • generates copy code from Predict file objects and inserts this code into the source program (or inserts already generated code into the source program)

    • writes corresponding XRef data.

To use the preprocessor in combination with Adabas Native SQL, it must be called before Adabas Native SQL. An asterisk must then be specified as Member name.

This document covers the following topics:

Calling the Preprocessor

The preprocessor is called with the following command:

PREPROCESS <language> [<member name>][<library>] [<user-ID>]

If the generation default parameter Preprocessor force is set to Y, the member must be documented in Predict as a 3GL program with fully qualified implementation pointer (member name and library name).

language Language in which the program to be processed is written:

  • PL/I

  • BAL - Identifies 370-Assembler.

member name The member name must not be longer then eight characters. The member name can be supplied in three ways. If the member name is specified in more than one way, it is evaluated in the order below:
  • When calling the Preprocessor;

  • Using the preprocessor statement PROGRAM;

  • Using a normal source program statement

    • in COBOL, the PROGRAM-ID in the Identification division;

    • in PL/I, the label preceding the first PROC or PROCEDURE statement

    • in BAL, the symbol in the name field of the START statement or the first CSECT statement.

If the preprocessor is used in combination with Adabas Native SQL, an asterisk must be specified.
library If the parameter library is specified, a system of type G (3GL application) containing this library name in its implementation pointer must already have been defined. If no library is specified, the default libraries *SYSCOB*, *SYSBAL* or *SYSPLI* are used.
user-ID The parameter user ID is only evaluated in batch mode. Online, the session user ID is evaluated.

Prerequisites - Work Files

The PREPROCESS command requires the first three Natural workfiles (DD-names CMWKF01, CMWKF02 and CMWKF03; BS2000-link-names W01, W02 and W03).

  • The first workfile is the input data set for the preprocessor.

  • The second workfile is the output data set; it should be declared with a record length of 80.

  • The third workfile is a temporary workfile; it should have record format F (fixed) or FB (fixed blocked) and the record size must be 91.

For an explanation of the Preprocessor Condition Codes see the section Predict in Batch Mode in the Predict Administration documentation.

Reports - Print Files

The preprocessor produces three types of reports:

  • a report that the run was successful or unsuccessful

  • a list of preprocessor commands found

  • a list of errors.

In batch, the reports are written to the first three Natural reports (DD-names CMPRT01, CMPRT02 and CMPRT03; BS2000-link-names P01, P02 and P03).