Johnny Luo wrote:
Hi,Recently we're helping a customer to rewrite their PL/I programs using Enterprise Z/OS COBOL. In PL/I programs, such statements were used to handle unidentified errors: ON ERROR BEGIN; ON ERROR SYSTEM; CALL PLIRETC(12); PUT SKIP LIST(' *****UNEXPECTED ERROR******'); STOP; END; As far as I know(Maybe I'm wrong), there is no equivalent in cobol for such processing. So i try to use LE service 'ceehdlr' to register a user-written cobol sub-program for error handling. Whenever an error occurs, control will be transferred to that sub-progam but the problem is : I want to terminate the execution of mainprogram in that sub-program which is exactly what these pl/i programs do. But I find out I can only 'resume', or 'percolate', or 'promote' . So, does anyone know how to do this in cobol?
1. issue STOP RUN - might work or 2. call CEE3ABD - terminates with no dump or 3. promote to T_I_S or T_I_U or 4. just percolate and let LE terminate the enclave "due to unhandled condition" [note that you can do logic, like log error messages, clean up stuff, etc. before you leave.] <ad> We discuss LE condition handling (and all other LE callable services) in our three day course "Using LE Services in z/OS". Details at: http://www.trainersfriend.com/Language_Environment_courses/m512descr.htm </ad> Kind regards, -Steve Comstock The Trainer's Friend, Inc. Kind regards, -Steve Comstock The Trainer's Friend, Inc. http://www.trainersfriend.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

