set MFTRACE_CONFIG=c:\ctf\ctf.cfg
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
If you are using the .NET environment, instead of setting the MFTRACE_CONFIG variable you can configure CTF tracing in an app.config file in the same folder as its associated app.exe file. The configuration statements must be inserted in an <mftrace_config> section in the <configSections> as CDATA. For example:
<?xml version ="1.0"?> <configuration> <configSections> <sectionGroup name="MicroFocus.COBOL.Tracing"> <section name="mftrace_config" type="MicroFocus.COBOL.Runtime.CdataSectionHandler, MicroFocus.COBOL.Runtime.Win32,Version=4.0.0.0,Culture=neutral, PublicKeyToken=0412c5e0b2aaa8f0" /> </sectionGroup> </configSections> <MicroFocus.COBOL.Tracing> <mftrace_config> <![CDATA[> 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 <]]> </mftrace_config> </MicroFocus.COBOL.Tracing> </configuration>
If you are using a JVM environment, you can also configure CTF tracing by using an mfjvm.ctf file, ensuring it is stored on the program's classpath. The format of this file is the same as the ctf.cfg file and is typically used when tracing web applications is required.