Skip to main content

This article explains how a core dump can assist when a program abends.

Problem:

What can be done to produce a core dump file when a fatal error occurs in a COBOL program running under Server Express on UNIX? How can a core dump file to assist with problem resolution be produced when a program abends?

Resolution:

There is a run time configuration parameter that can be set to generate a core dump. By default a core file is never produced, if this parameter is set the runtime system produces a core file when any system signal is received that would normally produce a core file on the host system, for example, SIGILL, SIGSEGV (which would usually produce a ime system error 114), and so on.

To generate a core dump add the runtime tunable core_on_error to the run-time configuration file. For details on the run-time configuration file and runtime tunables, see the chapter Runtime Configuration in the Server Express User's Guide.

Example:


  • Edit a file /tmp/myconfig
  • Insert a line: set core_on_error=1
  • Close the file
  • Export COBCONFIG=/tmp/myconfig

The option will automatically be picked up at runtime. The Server Express Debugging Guide also has a tutorial on Core File Debugging.

Note: When a core file is produced, the runtime system itself cannot clean up COBOL file buffers or free system resources. This could lead to data file corruption that might not have occurred if no core file was produced.

Incident Number: 2071998

Old KB# 14486