(Contents)(Previous)(Next)

Precompiler Options

This chapter contains a survey of all functions of the ADABAS precompiler which may be controlled by options. The syntax of these options is described separately in the platform-specific ADABAS User Manuals.

ansi c

Code is generated which is compatible with ANSI C.

c++

Code is generated which is compatible with C++.

cachelimit(<cachelimit>)

Cachelimit defines the size of a cache buffer for result tables. If the option check or syntax is set, this value overrides the value for the database session with the number 1 either specified in a connect statement or predefined. A description of the cachelimit is included in the Reference manual.

check/nocheck

The precompiler checks the syntax of all SQL statements, it checks whether the table and column names are available and whether their types are compatible with the host variables in use. The precompiler opens a database session either under the user name specified in the option or in the connect statement or under the predefined user name, and executes all SQL statements according to the order of their occurrence in the program. Possible error messages of the database system are stored as warnings in the precompiler listing. SQL statements which cannot be executed at the time of precompilation (e.g., dynamic statements) are only checked with regard to syntax errors; they generate warnings. The system tables DOMAIN.MOD_USES_TAB or DOMAIN.MOD_USES_COL, which contain the program-data relationships, are maintained. When starting the precompiler run, all entries relating to the connect user name and program name or module name are deleted from the corresponding tables. At the regular end of the precompiler run (no errors), new entries are made in the corresponding tables. The option nocheck does not establish a connection to the database. It is therefore possible to precompile without a started database.

check/syntax

The syntax of all SQL statements is checked and possible ADABAS error messages are written to the precompiler listing.

comment

All SQL statements are written as comments into the source file saved for the compiler.

compatible

With Version 6.1, new language elements are integrated in the embedded SQL (see chapter exec sql [<n>] <array statement>). These elements may change the interpretation of programs written for former releases. The option compatible enforces the old interpretation and thus guarantees upward compatibility. This option need only be specified if an error message occurs during re-precompilation of an existing program. In any case, new programs should be written in such a way that they may be precompiled without this option.

date-time/eur

This option can be used to set the date and time representation to 'europe'. It is passed to the application program.

date-time/iso

This option can be used to set the date and time representation to 'iso'. It is passed to the application program.

date-time/jis

This option can be used to set the date and time representation to 'jis'. It is passed to the application program.

date-time/usa

This option can be used to set the date and time representation to 'usa'. It is passed to the application program.

Representation:

extern

A module precompiled with the option extern can be linked to modules of other precompilers. The module itself must not contain a main function. Each function of the module containing SQL statements must be defined according to the following schema:

The identifier SQLCA for the corresponding formal parameter is prescribed.

A COBPC program could call this function in the following way:

The first SQL statement must be executed in the calling module which is precompiled without the extern option.

help

This option displays all the precompiler and precompiler runtime options (application programs) on the terminal.

isolation level(<level number>)

If the option check or syntax is set, the level number 10 (default value) is always specified for the connect. Under this number the locks have to be set to a database during precompilation. This option is only passed to the application program and has only an effect on the session with the number 1. It overrides the level specification for all connect statements with the session number 1 made in an application program. It may be overridden by the same runtime option when starting the application program.

list

A precompiler listing is generated. If this option is not specified, the precompiler listing only consists of warnings and error messages.

margins (<leftmargin>, <rightmargin>)

This option can be used to determine the range of lines in which the precompiler has to work.

nowarn

The warnings -733, -735, -853, -884, and -885 are not output.

precom

The compiler will not be started after precompilation. The source file is saved for the compiler.

profile

The precompiler generates code for profiling the SQL statements. Profiling is started with a runtime option.

program (<program name>)

When using the option check, a program name can be specified here related to which the names of the tables and columns used in the program are stored in system tables. These entries can be looked up via a select performed on the tables DOMAIN.MOD_USES_TAB or DOMAIN.MOD_USES_COL. The default value of <program name> is the filename of the source program.

serverdb (<serverdb>)

If the option check or syntax is set, a serverdb name can be specified here under which the database will be accessed at precompilation time. This option has an effect on all sessions with the number 1. When precompiling, this option overrides either the specifications made in the connect statement or the predefined user specifications. It is not passed to the application program.

servernode (<servernode>)

If the option check or syntax is set, a node name can be specified here under which the database will be accessed at precompilation time. This option has an effect on all sessions with the number 1. When precompiling, this option overrides either the specifications made in the connect statement or the predefined user specifications. It is not passed to the application program.

silent

No output is made to the screen.

sqlmode/ADABAS

This is the 'native mode' of an ADABAS application and the default value of the sqlmode option.

sqlmode/ANSI

This mode ensures ANSI compatibility of all SQL commands. Within the program, variables and statements must be defined according to the ANSI standard. When this option is enabled, some positive error situations are transformed into negative error messages (see chapter ANSI Compatibility'). They are passed to the application program. The option must be specified with the main module which contains the first connect statement.

sqlmode/ORACLE

This mode ensures ORACLE compatibility of all SQL statements. Within the program, variables and statements must be defined according to the ORACLE standard. When this option is enabled, some positive error situations are transformed into negative error messages (see chapter ORACLE Compatibility). They are passed to the application program.

timeout (<timeout>)

This option can be used to specify the session timeout for session 1. When precompiling, this option overrides either the specifications made in the connect statement or the predefined user specifications. It is not passed to the application program.

trace file (<trace filename>)

This option can be used to specify a name other than the default name for the trace file. If no other trace option was specified, the option 'trace short' is simultaneously enabled by default. The filename is standardized in the platform-specific ADABAS User Manuals according to the operating system conventions. This option is only passed to the application program. It may be overridden in the application program by the same runtime option.

trace long

Each SQL statement is written into a file, together with the values of all host variables, the sqlcode (if not equal to zero), the warnings (if warnings exist), and the 'sqlerrd (index_3)' value. This option is only passed to the application program. It may be overridden in the application program by the same runtime option.

trace short

Each executed SQL statement is written into a file, together with the sqlcode (if not equal to zero), the warnings (if warnings exist), and the 'sqlerrd (index_3)' value. This option is only passed to the application program. It may be overridden in the application program by the same runtime option.

user (<userid> <password>)

If the option check or syntax is set, a user name can be specified here under which the database will be accessed. This option only has an effect on the session with the number 1. When precompiling, this option overrides either the specifications made in the connect statement or the predefined user specifications. It is not passed to the application program.

userkey (<userkey>)

If the option check or syntax is set, a userkey can be specified here. The pertinent user, the database, timeout, cachelimit, and sqlmode are fetched from the XUSER file. The corresponding database can then be accessed by means of this user id. This option only has an effect on the session with the session number 1.

version

This option can be used to see information about the version used.


(Contents)(Previous)(Next)