There's no reason your SP macro code can't include a jump to an error handler when an error occurs.
Donald Knuth once wrote a scholarly article called "Structured Programming with GOTO Statements" where he showed that attempts to be "purely structured" were often more obscure than using a GOTO when it was simplest. Miklos Szigetvari asked: > 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
