Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tracing, add a statement like:

     Define_

...

Com Class(#Tracing)

...

 name(#TraceHandler)

 
If  If you are using the 7.2 Example Trace Handler this is all you need to do to expose the Trace Handler for use in your application. It is a self-contained object that will set itself as the system trace handler if a suitable trigger condition is satisfied. In the example, this is the existence of the file TracingOn.txt in the system source folder.

You are now ready to start adding tracing commands to your application source at places of interest in the RDML code. There are two methods available to do this TraceMessageText and TraceMessageData

TraceMessageText supports four variant input parameters. When used the TraceMessage method in the Trace Handler will be executed once for each of the variables specified.

...

     #Sys_Appln.TraceMessageText(

...

#Empno #Givename #Surname)

TraceMessageData has a source parameter and nine variant parameters. The variant parameters are substituted into the source parameter as if the Substitute intrinsic were being used.

     #Sys_Appln.TraceMessageData("

...

Employee &1 Name &2 &3"

...

 #Empno #Givename #Surname)  

Refer to 7.4 Example Use of Tracing for a sample form incorporating trace commands.

...