TRACE

Use the TRACE script function to output values to a trace file. The trace output is written to the file specified in the [TRACE] section of the INI file of the Automation Engine, see Automation Engine.

Important! This script function serves diagnostic purposes only. The Trace level that you select can generate huge amounts of data in a short time and this can have a noticeable negative effect on system performance. Use it when the Support team instructs you to do so explicitly. Your support case assistant knows which values to set to collect targeted data with the lowest impact on your system performance.

For more information, see Diagnostic Tools: Logs and Traces.

Syntax

TRACE (Trace option, trace level, trace output)

Parameters

  • Trace option

    Specifies what type of information you want to write to the trace.

    Format: Script variable or number

    Allowed values:

    • 1 TCP/IP

    • 2 Database

    • 3 File Transfer

    • 4 Srcall

    • 5 Memio

    • 6 JCL

      For Automation Engine processes, this value means rest tracing for REST processes and JCL for all other processes.

    • 7 Memsv

    • 8 SNMP

    • 9 Zuxml

    • 10 Cache

    • 11 Reporting

    • 12 Ucds

    • 13 Xscript

    • 14 global

    • 15 Internal

    • 16 Minimal

  • Trace level

    Level of detail that you want your trace to have.

    Allowed values: The allowed values depend on the trace option that has been selected. The table below explains the trace levels per trace option:

    Trace Option Trace Level explained
    1 TCP/IP

    1 = XRO, login

    2 = HOSTG timerperiod calculation, filescan Agent

    3 = Calendar calculation, mail sending

    4 = Extended Calendar calculation

    5 = FT connections

    6 = Calendar cache

    7 = SMTP

    9 = Max. output

    2 Database

    1 = SQL

    2 = Opcodes

    3 = Bind parameter

    4 = Data areas

    9 = Max. output

    3 File Transfer

    1 = Generating FT name

    2 = Additional FT info

    9 = Trace FT_ASYNC_QUIT

    4 Srcall

    1 = Call of server routines

    2 = Server interface

    3 = Input memory

    4 = Local memory

    5 Memio

    1 = Memory management

    2 = Extended memory management

    8 = Internal MQBUSY table

    9 = Internal memory areas

    6 JCL
    • For REST processes

      1 = HTTP headers and content

      2 = Login information

      9 = max. output

    • For JCL (WPs, CPs, JWPs, JCPs)

      1 = Generated JCL

      2 = Input and output parameters

      5 = Input and output parameters (binary)

      9 = Generated JCL (byte code)

    7 Memsv

    1 = ZUMEMSV OPEN/CLOSE

    2 = ZUMEMSV PUT/GET

    6 = FOREACH MEMSV

    8 SNMP

    2 = BLKCHNG, COCHNG

    9 = Max. output

    9 Zuxml

    1 = Call

    2 = Error

    3 = Exec

    4 = Recovery

    5 = Call+Error

    6 = Call+Exec

    7 = Call+Recovery

    8 = Call+Error+Recovery

    9 = Call+Exec+Recovery

    10 Cache

    1 = Insert/Search

    2 = Statistics

    11 Reporting

    1 = Optional reports (with JCL trace flag greater than 1) or trace writing into variable table (with MEMSV trace flag greater than 1)

    2 = Trace updating variable table (use with MEMSV trace flag greater than 1)

    3 = Trace reading from variable table (with MEMSV trace flag greater than 1)

    4 = Trace sections while resolving variables

    12 Ucds

    1 = UC_SEND

    9 = Max. output

    13 Xscript

    1 = xload

    2 = xreq

    4 = actprint

    5 = Save/restore syntax

    9 = Max. output

    14 global 9 = Max. output
    16 Minimal

    1 = Minimal trace

    2 = REGEN, FORECAST

    3 = COC_Abend, activate job

  • Format: Script variable or number

  • Trace output

    Any text that serves as trace output

    Format: Script literal or script variable

Return Codes

  • 0

    The trace was successful

  • 20208

    The trace level is not within the allowed range

Example

In the following example, a trace for the content of a script variable is activated. The trace is successful when a database trace with at least one of four trace levels was activated in the properties of the server processes.

:SET &NUMBER# = 10
:
SET &RET# = TRACE(2,4,"The variable NUMBER has the value: &NUMBER#")

See also: