![]() |
![]() |
ALLBASE/SQL C Application Programming Guide: HP 9000 Computer Systems > Chapter 2 Using the Preprocessor![]() Identifying Preprocessor Input |
|
In the simplest case, illustrated earlier in Figure 1-1, the ALLBASE/SQL C program consists of one source code file and, optionally, one or more user include files; both the source code and the include files can contain SQL commands. The preprocessor merges any include files into the source program, and preprocesses it. The resulting modified source code file is then compiled and linked in the same manner as a C program not containing embedded SQL statements. (Include files must either exist in the current directory or be specified with a full path name.) Regardless of the preprocessing mode you use, the source file and the ALLBASE/SQL message catalog must be available when you invoke the C preprocessor, as shown in Figure 2-2 “Full Preprocessing Mode Input and Output”. The source file is a file containing the source code of the C ALLBASE/SQL program with embedded SQL commands for one or more DBEnvironments. An alternative name can be specified by using the DROP option in the preprocessor command line, as explained earlier in this chapter. You must have proper table access authority to drop a module. When parsing the source file, the C preprocessor ignores most C statements and C compiler directives in it. Only the following information is parsed by the C preprocessor:
The ALLBASE/SQL message catalog, contains preprocessor messages and ALLBASE/SQL error and warning messages. The full pathname for the default message catalog is:
For native language users, the name of the catalog is:
where $LANG is the current language. If this catalog is not available, ALLBASE/SQL issues a warning and uses the default catalog instead. When you run the preprocessor in full preprocessing mode, also ensure that the DBEnvironment accessed by the program is available. |