Created On: 23 February 2011
Problem:
An issue was encountered when running Server Express on both HP-UX PA-RISC 11.11 and 11.23 whereby running the ‘anim’ command produced a core file. This error only occurred when COBMODE=32 was set. When this happened the core_on_error=1 configuration option had been set.
Core_on_error had been set in order to produce a core file for a program that was abending when being started using the ‘cobrun’ command. As the program was genuinely faulty a core file was generated, as expected.
However, with core_on_error=1 set they then attempted to animate a different program, which was a ‘clean’ program that did not abend. This program had previously run correctly to completion when activated using the ‘cobrun’ command and core file was produced.
But, when they then tried to animate the program (anim progname), it instantly produced a core file, even though the program had previously run to completion.
A core file ‘should’ only be created when you run a program as or called from an executable (eg cobrun), that abends with a critical runtime error. But in this instance it was being produced when attempting to animate a program.
Core_on_error had been set in order to produce a core file for a program that was abending when being started using the ‘cobrun’ command. As the program was genuinely faulty a core file was generated, as expected.
However, with core_on_error=1 set they then attempted to animate a different program, which was a ‘clean’ program that did not abend. This program had previously run correctly to completion when activated using the ‘cobrun’ command and core file was produced.
But, when they then tried to animate the program (anim progname), it instantly produced a core file, even though the program had previously run to completion.
A core file ‘should’ only be created when you run a program as or called from an executable (eg cobrun), that abends with a critical runtime error. But in this instance it was being produced when attempting to animate a program.
Resolution:
This failed when using the ‘anim’ command – i.e. anim tictac (where tictac is the program name being animated). It also failed when using other ‘anim’ files – eg anim32 tictac, anim32_t tictac, anim64 tictac etc. But, animation worked correctly when the COBSW= A switch was used or animation was activated using the cobrun A switch. The difference is that this uses cobanim, rather than anim.
It was decided that the best solution to this was to create a symbolic link to cobanim for each of the anim commands. The method recommended was as follows:
Create a /bin directory – this can be anywhere, but for example: mkdir /opt/microfocus/bin (if Server Express is installed in the default COBDIR directory /opt/microfocus.cobol, then a directory at the same level would make it easier to remember where it is and why)
Add that directory to the VERY BEGINNING of the PATH – eg:
export PATH=/opt/microfocus/bin:$PATH
Then, create a symbolic link from cobanim to anim:
ln –s $COBDIR/bin/cobanim /opt/microfocus/bin/anim
You could repeat this process and create a symbolic link for all the other anim files if required – anim32, anim64, anim_t, anim32_t and anim64_t
Eg: ln –s $COBDIR/bin/cobanim32 /opt/microfocus/bin/anim32
This means that when you use anim it will actually invoke ‘cobrun A’ and you can use the same parameters as you’d normally pass to anim.
This is not a COBOL bug – it is an OS issue, and although there is reference to patches (eg PHSS_40537 for 11.23 is one that is mentioned) our developers strongly recommend that you use the workaround suggested.
It was decided that the best solution to this was to create a symbolic link to cobanim for each of the anim commands. The method recommended was as follows:
Create a /bin directory – this can be anywhere, but for example: mkdir /opt/microfocus/bin (if Server Express is installed in the default COBDIR directory /opt/microfocus.cobol, then a directory at the same level would make it easier to remember where it is and why)
Add that directory to the VERY BEGINNING of the PATH – eg:
export PATH=/opt/microfocus/bin:$PATH
Then, create a symbolic link from cobanim to anim:
ln –s $COBDIR/bin/cobanim /opt/microfocus/bin/anim
You could repeat this process and create a symbolic link for all the other anim files if required – anim32, anim64, anim_t, anim32_t and anim64_t
Eg: ln –s $COBDIR/bin/cobanim32 /opt/microfocus/bin/anim32
This means that when you use anim it will actually invoke ‘cobrun A’ and you can use the same parameters as you’d normally pass to anim.
This is not a COBOL bug – it is an OS issue, and although there is reference to patches (eg PHSS_40537 for 11.23 is one that is mentioned) our developers strongly recommend that you use the workaround suggested.
Incident #2493829
Old KB# 33492