Previous Topic: Error HandlingNext Topic: SQL Plan Options Special Topics


Interaction of Multiple Preprocessors

Multiple preprocesors or precompilers may be used at your site. The other preprocessors or precompilers replace specialized code with legal statements. Source statements for the CA Datacom/DB SQL Preprocessor may be generated by another preprocessor, such as CA Librarian. Any preprocessor before the CA Datacom/DB SQL Preprocessor must be able to accept and pass through SQL statements.

Source code processed by the SQL Preprocessor could be processed by additional preprocessors after being preprocessed and before being compiled. There may be limitations on the forms of source statements that can be passed through the Preprocessor. For example, literals and comments not accepted by the supported host compilers might interfere with precompiler source scanning and cause errors. Interaction problems can only occur if one of the preprocessors or precompilers adds logic to the program which may be affected by another precompiler or preprocessor. You reduce the possibility of encountering interaction problems if you run the preprocessors or precompilers in the following order:

  1. CA Librarian

    CA Librarian retrieves the source code from a CA Librarian master file and passes it to the next preprocessor or precompiler. If your site has CA Librarian, you can extract the source code by running the batch CA Librarian program with the EXEC option. Use this method if the program contains COPYDD statements. Alternatively, if the CA Librarian Access Method (LIB/AM) is installed and the program contains no COPYDD statements, you can omit the CA Librarian step and allow LIB/AM to pass the source statements directly to the preprocessor or precompile. For more information on using CA Librarian, see the appropriate CA Librarian documentation.

  2. CA MetaCOBOL+ precompiler (COBOL only)

    Because this precompiler modifies source code (non-SQL), it must be run before the CA Datacom/DB SQL Preprocessor for COBOL.

  3. CA Datacom/DB SQL Preprocessors

    One of these is run next because it replaces SQL statements with COBOL, PL/I, or Assembler statements.

  4. CICS precompiler (COBOL and PL/I only)

    Always run this precompiler last.

If one or more preprocessors or precompilers is not run, you must retain the order previously specified for the remaining preprocessors or precompilers. If your site has preprocessors or precompilers in addition to those previously listed, the order in which they run may vary.