


The trace of an ADABAS application can be activated at three levels; whereby the results are recorded in a special trace file.
The lowest level is that of the SQL statement. The precompiler directives TRACE, TRACE LONG, and TRACE OFF enclose the SQL statements whose execution is to be recorded in the trace file. The directives are written into the program like SQL statements, e.g.:
EXEC SQL SET TRACE LONG END-EXEC.
The trace file contains all SQL statements enclosed by the directives; including those SQL statements which are executed within called subroutines. The name of the trace file is standardized according to the operating system conventions.
The next level comprises program units, such as modules and subroutines, which can be translated separately.. The SQL statements contained there are recorded in the trace file according to their logical sequence in the program. Any existing TRACE statements are rendered inoperative. The trace file is enabled with precompiler options. The first <trace filename> addressed will be the name of the trace file. This name is either formed from the <trace filename> or from the program name and a suffix.
The highest level is the trace of the entire application. If a trace option is specified when calling an ADABAS application, a trace file is opened for all executed SQL statements.
A comment line can be inserted into the trace file via the SQL statement EXEC SQL SET TRACE LINE.


