To the OP, why is it so important that ENTRY be used? Would two (non-nested) programs in the same source member be enough? i.e. a single source member containing two programs like this?
PROCESS NAME ID DIVISION. PROGRAM-ID. MAINPROG. END PROGRAM MAINPROG. PROCESS NAME ID DIVISION. PROGRAM-ID. CONDHDLR. END PROGRAM CONDHDLR. Personally, I think that COBOL should have a "package" structure like PL/I has had for a while... ________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Bill Woodger <[email protected]> Sent: Friday, August 5, 2016 9:13 AM To: [email protected] Subject: Another COBOL question I've already posted that for a dynamic CALL you are supposed to CANCEL the "main" program before using the ENTRY program. If there is nothing in the ENTRY program which relies on WORKING-STORAGE or LOCAL-STORAGE in the "main" program, you may ordinarily "get away with it", even though the lack of relationship would usually obviate the use of the ENTRY. I think you meant that the the LE handler *can't* be in a contained/nested program. Because it can't. What that all means exactly for your handler, I don't know. I'd never have thought to try to make the handler an ENTRY. The SET ... ENTRY will cause the handler (ALIAS) to be loaded as an entirely separate executable. I can't say that that wouldn't or shouldn't work, but it doesn't seem to. I think the abend you are getting is from LE attempting to locate/use the handler. I don't know if the nested/contained not working is a hint that the ENTRY won't work either. IBM do not recommend using an ENTRY full-stop. I'd use the two-program approach. It may be interesting to establish exactly why it doesn't work with the ENTRY, but only interesting, not so useful generally. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
