$PROC_TRACING_ADDITION
Add a prefix, which can contain a string or expression, to each line of ProcScript tracing information.
$PROC_TRACING_ADDITION=PrefixString
Arguments
PrefixString—a string or
expression. String substitutions (such as %%$componentname
or
%%/
) can be used in the expression. They are evaluated at runtime.
Defaults
Assignment file: | client assignment files |
Section: | [SETTINGS] |
Default value: | None |
Description
You can use $PROC_TRACING_ADDITION to enhance the output produced by ProcScript tracing.
You can add a prefix to ProcScript tracing information for the whole application using the $PROC_TRACING_ADDITION assignment setting, or selectively in ProcScript using the $proc_tracing_addition function. The ProcScript function overrides the assignment setting.
Note: The information in the log file may be truncated, depending on the length of the additional information.
For more information, see ProcScript Profiling and Tracing.
String Substitution in Prefix String
When using the $PROC_TRACING_ADDITION setting, you can specify an expression that uses string substitution to include the values of functions and variables, or to include special characters. For example:
[SETTINGS] $proc_tracing = 1 $proc_tracing_addition="Component: %%$componentname / Status: %%$status"
The resulting tracing log shows the current component name and value of $status:
... "Component: UTAB1 / Status: 0"(_application_exec) APPL:1 activate "UTAB1_START"."EXEC"( ) "Component: UTAB1 / Status: 0"(_application_exec) APPL:2 done<end of module> "Component: UTAB1_START / Status: 0"(_detail) DTLF:1 activate "UTAB1_MAIN"."EXEC"( ) "Component: UTAB1_MAIN / Status: 0"(_execute) EXEC:1 $valrep(TAB.DUMMY) = "" "Component: UTAB1_MAIN / Status: 0"(_execute) EXEC:2 putitem/id $valrep(TAB.DUMMY), "I1", "General" "Component: UTAB1_MAIN / Status: 1"(_execute) EXEC:3 newinstance "UTAB1_TAB", "I1" "Component: UTAB1_MAIN / Status: 0"(_execute) EXEC:4 activate "I1"."RETRIEVE"( ) "Component: UTAB1_TAB / Status: 0"(OPER) RETRIEVE:1 retrieve ...
Note: However, when using the equivalent ProcScript
function $proc_tracing_addition, string substitutions are evaluated. This
results in a prefix string with hard-coded substituted values (for example "Component:
UTAB1 / Status: 0"
). To prevent this, put a space between the substitution symbol
(%%
) and the function or variable name; for example %%
$componentname
.