DML functions: Trace access

addTrace

countTraces

getTraces

getLastTraceMessage

getLastTraceModule

getLastTraceCode

The following Trace access functions are available:

addTrace

addTrace Comment

Description

addTrace writes a message to the Trace Viewer in Copilot.

Syntax

addTrace (type, message)

Parameters

message
Enter a description of the information logged. This parameter is free text surrounded by quotes.

type

The type parameter describes the type of the logged event. This parameter is free text surrounded by quotes. The standard types of log events used in the Trace Viewer are:

  • INFO
  • DEBUG
  • WARNING
  • ERROR
  • FATAL

Examples

addTrace ("INFO", "Variable counter = " & %counter & " on step 6")

countTraces

countTraces Comment

Description

countTraces returns the number of existing traces.

Syntax

countTraces ()

Return

Integer

Parameters

none

Examples

%i:=countTraces()

getTraces

getTraces Comment

Description

getTraces returns all the traces in a string. Traces are separated by the new line character.

Syntax

getTraces()

Return

String

Parameters

none

Examples

getTraces() returns for example:

[JDB - 18001]: ORA-00903: invalid Table name

getLastTraceMessage

getLastTraceMessage Comment

Description

getLastTraceMessage returns the message of the last posted trace.

Syntax

getLastTraceMessage()

Return

String

Parameters

none

Examples

getLastTraceMessage()

getLastTraceModule

getLastTraceModule Comment

Description

getLastTraceModule returns the module of the last posted trace.

Syntax

getLastTraceModule()

Return

String

Parameters

none

Examples

getLastTraceModule()

getLastTraceCode

getLastTraceCode Comment

Description

getLastTraceCode returns the code of the last posted trace.

Syntax

getLastTraceCode()

Return

Integer

Parameters

none

Examples

getLastTraceCode()

Related Links