I have been using assembler for the last 30 years or so and not doing much coding in COBOL.
I now have a need to write a program that needs to have a user written error handler.
The concept of the program is that it will issue a SET xxxx to ENTRY 'modname'. The problem is, modname may not exist in the current set of load libraries available to the program. So, I want to trap the S806 that will be issued (that is, the CEE3DD error) and allow the program to continue versus be aborted.
I have successfully written a two program construct that traps the S806 and allows the program to continue, but what I really want to do is combine the two programs into 1 and use an ENTRY statement for the entry point of the error handler.
I have done this and the SET used to obtain the entry point of the handler function and is successfully used in a registration call for the error handler.
Unfortunately, when I execute the program, the error handle routine does not get control. My SET xxxx to ENTRY 'modname" fails with a CEE3501S, which is the s806 LE abend code, which my error handler is lookginfor, but, as I indicated, the error handler isn't gaining control.
To be clear, I do have two entries in my load library for the program and the error handler. In fact, the error handler is shown in the load library member list as being an ALIAS of the main program.
If I check the link edit output, it all appears to be correct and it, too, shows the main program and the error handle entry as being an alternate entry point.
I realize that this is going to cause 2 copies of the executable module to be loaded, but the modules are very small so I don't really care about that part.
Has anyone written a main program/error handler construct like this? If so, did you ever get it to work?
Thanks,
Charles
Chuck Hardee