You can use this function if you want to activate trace level 2 or 3 for a long period, but want to ensure that the trace file does not become too large. This is useful if you are trying to locate a sporadic error. If you are waiting for a particular trace output, you can specify that the trace file should be saved after the pattern you are searching for is found, and that the trace level should then be reset to 1.
In this way, you can easily control the size of the trace files. You can also search the trace file for a particular character string without running the risk of filling up your hard disk if a high trace level is active.
Set Size Limit for Trace Files
To activate trace logging, you have to set the parameter rdisp/TRACE_LOGGING. Here, you also specify the maximum size of the trace file.
If the trace file reaches that size, the content is written to a log file with the name of the trace file and the extension .old. The current trace file is then reset. The parameter rdisp/autothtime is used to define how often the trace file should be checked and, if necessary, reset. The default is 60 seconds.
Trace logging is active for the following trace files:
- Work process traces dev_w*
- Dispatcher trace dev_disp
- Gateway trace dev_rd
- ICM trace dev_icm
- Message server trace dev_ms
Specify Trace Components
The parameter rdisp/TRACE_SEARCH_LIST is used to specify a list of trace components that you want taken into account in the automatic trace search.
As a value for this parameter, you can enter a list with the following elements (use a comma or a semicolon to separate elements):
- ALL: all trace files are searched (default)
- WP: all work process trace files are searched
- DISP: the dispatcher trace file is searched
- GWRD: the gateway trace file is searched
- ICMAN: the ICM trace file is searched (if available)
- MS: the message server trace file is searched (if available)
rdisp/TRACE_SEARCH_LIST = WP, ICMAN means that all work process trace files and the ICM trace file are searched.
Search Trace Files for a Pattern
The parameter rdisp/TRACE_PATTERN_<x> is used to search the trace files for a specific pattern. When the specified file size if exceeded, the file is then searched for this pattern. If the pattern is found, the trace level is reset to 1 for all active components.
You can also use wildcards (* for any character string, ? for a single character) in the pattern. Use a backslash (\) to ensure that special characters are treated as ordinary characters. See below for examples.
For the sake of readability, the search patterns in the following examples are enclosed in inverted commas. When specifying your own search terms in RZ11 or in the profiles, however, enter them without inverted commas.
- The pattern "word1 * word?" is found in the line "one example with word1 and word2", but not in the line "one example with word1 and word".
- The pattern "10 \* 10 =" is found in the line "multiplication: 10 * 10 = 100", but not in the line "addition: 10 + 10 = 20".