This article explains how to produce a core file for every error.
Resolution:
With Server Express 4.0 ServicePack2 and Server Express 5.0, the core file can be created for every error.
echo '123456 01 Z1 PIC 9(4).' > prog.cbl
echo '123456 add 1 TO Z1.' >> prog.cbl
cob prog.cbl
echo 'set core_on_error=2' > my.cfg
COBCONFIG=./my.cfg
export COBCONFIG
cobrun prog.int
In this way a core file is created .