First of all, please accept my apologies, because this question is about an LE C program with POSIX(ON) running in a batch job. However, I read through the category list many times but really did not find C/C++ category. But I really need some suggestion about this.
I have a program written in LE C, executed with POSIX(ON) in a batch job. This program uses a DLL, linked with a SIDE-DECK file.
When the DLL it depends on does not exist, the program ended up with ABEND S806/RSN-4, the dump writes:
DESCRIPTION: S806 - A MODULE REQUESTED BY THE PROGRAM COULD NOT BE FOUND.
OK, nothing surprise till now.
But from the SYSPRINT of the job log I noticed that the program actually executed, it even printed out some message until it called the function in the DLL and ABENDed with S806. Therefore I wanted to 'catch' the error and print more error message in order to let it ABEND more gracefully
I tried to setup signal handler for SIGABEND using the following snippet:
More specific details on this issue are required to get any meaningful answer.
ABEND S806 only means that the name of the 'called function in the DLL' is not defined properly, or its name is not available for some reason at the moment of (dynamic) CALL, which is actually LINK in terms of Assembler programming.
I don't remember the details, but most likely ABENDs like S806 (e.g. those raised inside of zOS components) cannot be handled by application in this manner, like sigaction().
More specific details on this issue are required to get any meaningful answer.
ABEND S806 only means that the name of the 'called function in the DLL' is not defined properly, or its name is not available for some reason at the moment of (dynamic) CALL, which is actually LINK in terms of Assembler programming.
I don't remember the details, but most likely ABENDs like S806 (e.g. those raised inside of zOS components) cannot be handled by application in this manner, like sigaction().
Thank you for your quick response, Sergeyken. I know S806 has several meanings depends on different RSNs. But actually I'm not investigating a root cause of a problem. I clearly know the ABEND was caused by a missing DLL because I created the situation. I just would like to know if it is possible for an application to catch the error at runtime.
So, since you suggested that an application cannot catch this error through signal handling, I think I have to find other way around.