Miklos, all Good question. I'm not sure the following is a best practice, but I've found it useful in developing z390 in Java and zcobol in z390 assembler.
I have used several callable routines to handle all error messages and aborts. One routine called log_error(error_number,error_msg) logs error message and returns to caller which allows caller to continue on or handle error. The other routine named abort_error(error_number,error_message) logs error and then issues abort. This approach minimizes insertion of GOTO's (one abort call), and allows user to maintain the shared routines which handle error logs, console logs, maximum return codes, etc. Don Higgins [email protected] On Thu, 3 Feb 2011 18:16:57 +0100, Miklos Szigetvari <[email protected]> wrote: > Hi > > Asking here for the best practices to rewrite "spaghetti" assembler >code to use structured programming macros >I think I red a number of SHARE presentations > >My concern is currently the error handling > Till now, if an error occurred, there was a JUMP/BRANCH to an error >block, with all the possible error messages , and after a JUMP/BRANCH >to the module RETURN. >Seems to me , instead of this, some DOEXIT or ASMLEAVE would be more >complicated Mikos, all
