cobfhrepro3 File name display

I'm using the mFFH cobol facility to create a file trace in a managed cobol program.  It's working file, but when I run cobfhrepro3 to produce a report of the trace, the file name on the report is only 30 bytes.  I'm using a fully-qualified UNC path as the file name, and it's way more than 30 bytes.

Is there a way to tell the trace facility or cobfhrepro3 to display more than 30 bytes of the file name?

Just a bit of background...the program I'm tracing wasn't written by me, and was written in native cobol.  I converted it to managed cobol so we could use it in a WCF service.  After about 500 runs, the service crashed in the Micro Focus file handler.  I'm guessing that there is a file that is not being closed, so the system is running out of file handles.  Since the program uses a lot of files, I'm using the trace facility to try to match opens and closes.

Any help would be much appreciated.

Thanks!

Tags:

Parents
  • What product version are you using?

    My next question would be are you using a RunUnit to control the calling of your COBOL programs from within the WCF service?

    If you are creating a RunUnit upon entry to the service and then calling the programs through the RunUnit then you should be able to clean up the resources including file handles by invoking the RunUnit.StopRun method.

    There is an example in the Samples Browser of using RunUnits with WCF, search for Run Units in the left-hand window and WCF Airport Demo on the right-hand side.

    If you do need to trace the file I-O operations, cobfhrepro3 seems to be limited to displaying just the first 30 characters of the filename in the displayed output. I do not see an option to change this behavior.

    I would recommend that you use a CTF trace to create a log file of all file handler operations instead as this will contain the full file name for both file open and close operations.

    If you set the environment variable MFTRACE_CONFIG to point to the following config file then the file handler will be traced.

    SET MFTRACE_CONFIG=c:\mytrace\myctf.cfg

    Create c:\mytrace\myctf.cfg containing the following: (this can have any name in any accessible location)

    mftrace.level=debug
    mftrace.dest=TEXTFILE
    mftrace.emitter.TEXTFILE#location=.\
    mftrace.comp.mf.mffh.xfh#all=true
Reply
  • What product version are you using?

    My next question would be are you using a RunUnit to control the calling of your COBOL programs from within the WCF service?

    If you are creating a RunUnit upon entry to the service and then calling the programs through the RunUnit then you should be able to clean up the resources including file handles by invoking the RunUnit.StopRun method.

    There is an example in the Samples Browser of using RunUnits with WCF, search for Run Units in the left-hand window and WCF Airport Demo on the right-hand side.

    If you do need to trace the file I-O operations, cobfhrepro3 seems to be limited to displaying just the first 30 characters of the filename in the displayed output. I do not see an option to change this behavior.

    I would recommend that you use a CTF trace to create a log file of all file handler operations instead as this will contain the full file name for both file open and close operations.

    If you set the environment variable MFTRACE_CONFIG to point to the following config file then the file handler will be traced.

    SET MFTRACE_CONFIG=c:\mytrace\myctf.cfg

    Create c:\mytrace\myctf.cfg containing the following: (this can have any name in any accessible location)

    mftrace.level=debug
    mftrace.dest=TEXTFILE
    mftrace.emitter.TEXTFILE#location=.\
    mftrace.comp.mf.mffh.xfh#all=true
Children
No Data