How to create a compressed file trace
October 2003Often, it is necessary to get a file trace of a lengthy program, and the file can get rather large. Usually, the size of the trace file can be controlled by using the configuration variable MAX_ERROR_LINES. Sometimes, however, a full trace file is needed. Here is an easy way to get a compressed file trace on UNIX. By using Gzip, you should be able to get about 97% compression on a level 8 file trace file.
- Create a named pipe (FIFO) somewhere convenient:
$ mknod file-trace p
- Run your compression program, using the named pipe as input, and redirecting the compressed output to another file:
$ gzip -9v < file-trace > file-trace.gz
- This command will wait until the runtime closes the file trace file. Then, from another shell, run your runtime, directing the error file to the FIFO:
$ runcbl -lex file-trace program.acu
After the program exits, the gzip will finish and the error file contents will be gzipped up in file-trace.gz.
####
Acucorp, extend and ACUCOBOL are trademarks or registered trademarks of Acucorp, Inc. All rights reserved. All other trademarks are the property of their respective owners.

























