Abend Causing Line

余生长醉 提交于 2019-12-12 10:01:37

问题


Is there any way that we can find the exact line number that causes an abend ( like SO4C) from the Offset(like offset +00007D0A at address 1515CD0A) given in the spool with the error message.?


回答1:


If your program is compiled with options OFFSET,NOLIST, you will have a list of verbs/line numbers in the output listing which contain the "offset" from the start of the program. The line number on the the listing which has the closest offset, but less than or equal to, the "offset" reported in the abend, is where you want to look.

If you use NOOFFSET,LIST, you will get the "generated assembler" in your compile listing, and your abend "offset" should match exactly to the "offset" of one of the generated instructions, and you should be able to easily identify the COBOL source line from that, it is the first verb with line number before the actual machine instruction listed.

Bear in mind that in the rare cases in which you've managed to overwrite program code and that has eventually caused an abend you'll have to work harder, but for an "ordinary" abend it is quite straightforward.

If you use compiler options NOLIST,NOOFFSET, then you will have no clue. Re-run the compile with one of the options set. Unless the program sizes are identical, run the abending job again as well

If you use LIST,OFFSET, the compiler will produce a diagnostic message, and you will have to choose one of the valid options. LIST and OFFSET are mutually exclusive.



来源:https://stackoverflow.com/questions/17102134/abend-causing-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!