Runtime tracing in Visual LANSA

Date:11 July 2005
Product/Release:Visual LANSA
Abstract:How to enable tracing on a runtime application when requested by LANSA support
Submitted By:LANSA Technical Support
Last Review:November 2010

LANSA provides the ability to trace a running Visual LANSA application. Under normal circumstances, enabling tracing will not be required. Enabling tracing will only be required when requested by LANSA support. There is no expectation that LANSA users will understand the trace output. The trace output is intended exclusively for use by the LANSA development team.

Trace Considerations:

  • Enabling tracing is a LANSA troubleshooting tool. It should not be enabled unless requested by a LANSA representative.
  • The trace output files will be named x_trace.nnn (where nnn is a number, for example, x_trace.001)
  • Enabling tracing will degrade application performance significantly
  • Tracing can be enabled on the x_run command, in a LANSA start file, as an environmental variable
  • In a client/server application (for example, a SuperServer application to a windows backend server), setting tracing on the client side will cause BOTH the client trace files and the server trace files to be generated.
  • Setting tracing on the server side will cause trace files to be generated on the server ONLY.

Trace Options:

This parameter specifies whether the application is to produce a trace file. Specify Y to produce a trace file or N to not produce a trace file. Trace files are named X_TRACE.nnn. The highest nnn suffix indicates the newest trace file. The production of trace files severely impacts application performance.

This parameter specifies the level of trace. Valid values are 0 to 4, where 0 provides the lowest level of detail and 4 the highest level of detail. This should not be changed unless requested by your Product Vendor.

This parameter specifies the maximum number of lines in the trace file. The maximum number is 999,999,999.

This parameter specifies the trace categories. It allows you to restrict the areas of LANSA that will generate trace messages. This should not be changed unless requested by your Product Vendor.

This parameter specifies the heap validation level. This should not be changed unless requested by your Product Vendor.

Turn tracing on and off by commands embedded within your application:

Sometimes tracing from the start of your application is problematic because so much trace data may be generated by your application before you get to the problem area.

In LANSA V11 it is possible to selectively turn tracing on and off by commands embedded within your application. This allows you to turn tracing on immediately before entering the problem area, thus drastically reducing the amount of trace data produced.

Here's some examples of how to dynamically manipulate tracing from within your application:

Checking if tracing is ON or OFF 

If (#Trace = Y)
<< tracing is currently on >>
<< tracing is currently off >>

Turning Tracing ON or OFF

USE SET_SESSION_VALUE (ITRO N) << turns tracing off  >>
USE SET_SESSION_VALUE (ITRO Y) << turns tracing on  >>

Other Tracing Values can be also altered

For example: