ContentsIndexPreviousNext

File Tracing

File tracing is always available. Programs do not need to be compiled with the debug (-Gd or -Ga) options to use file tracing. The procedure provides valuable information about file operations. File status codes for unsuccessful I/O operations are also shown, and configuration variable settings can be examined. For relative files, file trace includes record numbers.

To use file trace, type:

runcbl  -dlxe  errfile  -x  myprog

Where:

runcbl represents the name of the runtime system
-d turns on the debugger.
-l (optional) causes the contents of the runtime configuration file to be included in the error output.
-x (optional) includes secondary error code for error 30.
-e causes the error output to be placed in the file named immediately after the option.



CAUTION: if you use this option and do not specify an error file name, your object file (myprog) is emptied and used as an error file.
errfile is the user-specified name of the error file.
myprog is the name of your object file.

After you press <return> you are at the debugger screen. To turn on file tracing, type:

tf [#]

"FILE TRACE" is echoed on the screen. Type:

g

You are now running your program normally. Proceed until you encounter the error condition, and then exit. Your error file contains the error information, all COBOL configuration file variables that you have set, and a record of every file operation.