@rice.edu:SXRJC@ALASKA.BITNET (ROBERT J CONCANNON) (10/06/89)
we have a need for a small subroutine callable from cobol that will produce programmer-specified user abends (and abend codes, u4095 etc) without hardcoding the specific abend code in the source. in other words, i would like to pass the required value at runtime to a subroutine containing the #abend macro. i am only a rudimentary assembler programmer, and the only ways i see to do this are definitely 'hokey'. the problem is that the macro expansion requires a non-relocatable variable (it embeds the abend code inline in the machine code) and anything i want to pass is relocatable. is there an easy way to circumvent this restriction? thanks, bob concannon, university of alaska, fairbanks
SEB1525@ccfvx3.draper.COM ("Steve Bacher ", Batchman) (10/06/89)
Code the macro as: ABEND (1),DUMP and stick the abend code in register 1. Format is X'80XXX000' for system abend XXX (the high-order bit is on to take a dump) X'00000XXX' for user abend XXX (where XXX is hex equivalent of user code) Yes, you CAN issue your own system abend codes. Some software actually does this (such software should be taken out and shot, IMHO) to "handle" program checks after a SPIE catches them. On second thought, don't code the ",DUMP" part. Hope this helps. Let me know if I gave you totally wrong information. - Steve Bacher - Draper Lab Disclaimer: This opinion is offered "AS IS" with no warranty implied.
SXRGS@ALASKA.BITNET (Gordon Schumacher) (10/15/89)
The #abend macro (at least the version I'm looking at) can take a register or DC field as input for the code. I would suggest you either move the passed code to defined field or just pass whatever register you have pointing to it after you pick up your parm addresses... i.e... #abend abcode=(r9) where r9 points to the passed code. I;ve never used the IDMS version but would imagine this work do it....