TraceUser
PowerScript function
Description
Logs the activity type value you specify to the trace file.
Syntax
|
1 |
TraceUser (info, message ) |
|
Argument |
Description |
|---|---|
|
info |
A long whose value is a reference number you want to |
|
message |
A string whose value is the activity type value you want |
Return value
ErrorReturn. This function always returns Success!.
If info or message is null, TraceUser returns null and no entry is
made in the log file.
Usage
TraceUser logs an activity type value of ActUser! to the trace file.
This is the default activity type and is enabled when the TraceOpen
function is called. You use the TraceUser function to record your own
message identifying a specific occurrence during an application run. For
example, you may want to log the occurrences of a specific return value or
the beginning and end of a body of code. TraceUser works just like the
TraceError function except that you use TraceError to identify more severe
problems. The info and message values are passed without modification to
the trace file.
Examples
This example logs user messages to the trace file identifying when a
database retrieval is started and when it is completed:
|
1 2 3 4 5 6 7 8 |
dw_1.SetTransObject(SQLCA) TraceUser(100, "Starting database retrieval") IF dw_1.Retrieve() = -1 THEN TraceError(999, "Retrieve for dw_1 failed") ELSE TraceUser(200, "Database retrieval complete") END IF |
See also