Skip to main content

Consolidated Tracing Facility (CTF)

  • June 21, 2019
  • 0 replies
  • 0 views

Introduction

This cheat sheet demonstrates how to use the Consolidated Tracing Facility (CTF) viewer to view binary format trace files that were created using the CTF binfile emitter.
Eclipse includes the CTF perspective, which includes the CTF Viewer File View that displays the content of the trace file, as well as the COBOL Explorer, Properties and Bookmarks views. You can also use annotation files to get more meaningful textual descriptions to certain identifiers of the trace file in File View.
To use the CTF viewer, you need to create trace files in binary format and to set up your environment and CTF configuration file appropriately.

Import a demo to create a COBOL project

Click File > New > Project, expand Micro Focus COBOL and select COBOL Project.
Give your project a name and choose where to store it, then click OK.
Click File > Import, expand General, select File System and click Next.
Browse to the Samples or Demo folder in your COBOL development system installation and click Select All.
Specify your project in the Into folder field, or leave this field unchecked if you want to refer to the imported project in its existing location.
Click Finish.

Create a CTF configuration file

Create a new file called ctf.cfg with a text editor.
Paste the code below into it:
# MFTRACE configuration file
#mftrace.emitter.binfile#Format = $(TIME) $(THREAD) $(COMPONENT) $(EVENT) $(LEVEL) :$(DATA)
mftrace.dest = binfile
mftrace.emitter.binfile#location = c:\\logs
mftrace.level.mf.rts = info
mftrace.comp.mf.rts#pgm = true
mftrace.comp.mf.rts#pgmload = true
mftrace.comp.mf.rts#syspgm = true

This CTF configuration file specifies the tracing information that you want to capture:

mftrace.dest - specifies the format of the output trace file (for example, binary).

mftrace.emitter.binfile#location - specifies the location of the output trace files (c:\\logs in a this Windows example). On UNIX, edit the code above to specify a correct path on your file system.

mftrace.emitter.textfile#Format - specifies the format of the output tracing information.

mftrace.level.mf.rts - specifies the severity level of tracing messages to capture, either info, warn or error.


#MFDS
#EnterpriseDeveloper

0 replies

Be the first to reply!