Collecting a standalone database logger trace dynamically using JCL

We can use the BFGLGTC member within the dataset containing the JCL, for the logger that needs to be traced, to collect trace from a running Managed File Transfer for z/OS® logger. This can be very useful if IBM® Support need to see a trace from a logger that cannot be stopped.


To collect a trace from a logger using the BFGLGTC member, complete the following steps.


Procedure

  1. Locate the dataset containing the JCL for the logger that needs to be traced.
  2. Edit the BFGLGTC member within the dataset, and locate the line that contains the text:
    -traceLogger
    The text following this contains the list of internal classes and packages that are to be traced. By default, this list is set to:
    com.ibm.wmqfte=all
    Unless otherwise specified by your IBM Support representative, leave this value as is.
  3. Submit the BFGLGTC member.
  4. Reproduce the issue.
  5. Edit the BFGLGTC member again, and set the -traceLogger parameter to =off, as shown:
    -traceLogger =off +
  6. Submit the BFGLGTC member again, to turn trace off.
  7. If a logger is busy, then it is possible that the trace files will wrap quickly and overwrite the information needed to investigate the issue. In this situation there are two options:
    1. The first option is to:
      1. Schedule some time to stop the logger.
      2. Locate the logger.properties file for the logger that needs to be traced. The logger.properties file can be found in the BFG_DATA/mqft/config/coordination_qmgr_name/loggers/logger_name directory.
      3. Edit the file and add entries for the following properties:

        • traceFiles=number of trace files to use
        • traceSize=size of each trace file, in MB

          The traceFiles and traceSize properties are used to control the amount of trace data that is collected.

          The default value of the traceFiles property is 5, and the traceSize property has the default value of 20MB. This means that if you turn on trace dynamically, and we have not set the properties, the logger writes trace information to 5 wrapping trace files, each with a maximum size of 20MB.

          You should set these properties to large values, to collect as much trace data as possible.

          For example, to collect 1GB of wrapping trace, add the following lines to the logger.properties file:
          traceFiles=5
          traceSize=200
          
          This results in the logger writing trace data to a maximum of 5 files, where each file has a size of 200MB.

          For more information on these logger properties, see The MFT logger.properties file.

      4. Locate the data set containing the JCL for the logger that needs to be traced.
      5. Submit the BFGLGSP member within the data set to stop the logger.
      6. Restart the logger, by submitting the BFGLGST member in the data set.
      7. Edit the BFGLGTC member within the data set, and locate the line that contains the text:
        -traceLogger
        The text following this contains the list of internal classes and packages that are to be traced. By default, this list is set to:
        com.ibm.wmqfte=all
        Unless otherwise specified by your IBM Support representative, leave this value as is.
      8. When it is time to enable trace, submit the BFGLGTC member.
      9. Reproduce the issue.
      10. Edit the BFGLGTC member again, and set the -traceLogger parameter to =off, as shown:
        -traceLogger =off +
      11. Submit the BFGLGTC member again, to turn trace off.
    2. The second option is to contact your IBM Support representative, if it is not possible to stop the logger for a short period of time. We can then discuss alternative trace specifications to use, in order to reduce the amount of trace data that is being generated.


Results

The resultant trace files are written to the BFG_DATA/mqft/logs/coordination_qmgr_name/loggers/logger_name/logs/trace%PID% directory, where %PID% is the process identifier for the logger.