Re: Obtaining the Entry Point and Offset for an abending program in the SD WA
What about the more complicated case where the program associated with the RB calls a loaded module, or a module located throut, e.g., the CVT? What about an ABEND in a PC routine? Is there any reason not to use CSVQUERY on the instruction address of the appropriate PSW field? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Peter Relson [rel...@us.ibm.com] Sent: Sunday, January 10, 2021 11:16 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining the Entry Point and Offset for an abending program in the SD WA >When I display SDWAEPA its always Zeroes. Consider checking the method by which you display SDWAEPA. The simplest case: -- Your program gets control via EXEC PGM= -- Your program sets ESTAE-type recovery (whether ESTAE, ESTAEX or whatever) -- the next instruction blows up (so that you know you are still running under the PRB -- your recovery routine gets control and the SDWA at offset x'60' will have SDWAEPA set. If you blow up under a PRB and the PRB has a CDE/LPDE address in RBCDE1, then SDWAEPA is set from CDENTPT and SDWANAME is set from CDNAME. I would assume that a SYNCH PRB would not have a CDE/LPDE address but a PRB created for ATTACH(X), LINK(X), XCTL(X) likely would. For an IRB, the SDWAEPA information is taken from RBEP. The conten If the entry point of the module is not at offset 0, you can calculate the offset of time of error versus the entry point, but that won't help you getting the offset into the module (or necessarily which CSECT). You might need AMBLIST for that (or at least knowledge of where within the load module the entry point is).. Here's an example of the beginning of an SDWA for the simple case: 09301494 840C1000 FF850001 FF850001 09301048 09300022 00FD7188 00FF3E00 005FED90 005DBFC8 00FCA680 005FEF28 005F83E8 01DC9C00 0001 093000C0 09301000 030F E3C5E2E3 40404040 0930 078D1000 89300094 00020001 7F4FA400 078D1000 89300094 Offset 58 is SDWANAME ("TEST" in my case) and offset 60 is SDWAEPA (x'0930' in my case). Peter Relson z/OS Core Technology Design -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining the Entry Point and Offset for an abending program in the SD WA
Why not use CSVQUERY? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Joseph Reichman [reichman...@gmail.com] Sent: Sunday, January 10, 2021 3:21 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining the Entry Point and Offset for an abending program in the SD WA You should pass the program name or rather CSECT name as a parm that way you can compare it to CDNAME if you say the program has multiple csect then quit possibly the CDE is minor CDE if so then CDXLMJP is pointer to the next CDE not xlst you can chain via CDXLMJP to get the load module CDE name in which case you Can get length of the entire load module and see if the PSW SDWAEC1 or EC2 is within youR load module if not then the abend is somewhere in z/os in which case you will have to chain SDWARBAD to get to your program RB -Original Message- From: IBM Mainframe Discussion List On Behalf Of Michael A. Shaw Sent: Sunday, January 10, 2021 1:56 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining the Entry Point and Offset for an abending program in the SD WA On 1/9/2021 1:08 PM, esst...@juno.com wrote: > > . > The Program runs as a standard Batch Job with Multiple CSECTS and has an RB. > Why do I always get Zeroes in SDWAEPA ? > . > I don't see a field called "Offset" in the SDWA so I suspect that > needs to be calculated, but with out an Entry Point Address (EPA) I cant' calculate it. > . > Can some shed some light on my lack of understanding of this ? > . We don't use SDWAEPA 'cause it is zero sometimes (don't know why). We check to be sure bit SDWARPIV is OFF in the SDWAERRD byte, and if it is, we use the rightmost four bytes of the SDWACTL1 field as the address of the next instruction @ time of ABEND. Using that information you can see if the failure was in your ESTAE exit itself or not. If not, then you can use a combination of the address of the next instruction and breadcrumbs passed to your ESTAE exit via SDWAPARM to determine which CSECT was executing at the time of the ABEND. SDWACMPC helps you decide if the ABEND is worth retrying or not. Mike Shaw MVS/QuickRef Support Group Chicago-Soft, Ltd. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining the Entry Point and Offset for an abending program in the SD WA
You should pass the program name or rather CSECT name as a parm that way you can compare it to CDNAME if you say the program has multiple csect then quit possibly the CDE is minor CDE if so then CDXLMJP is pointer to the next CDE not xlst you can chain via CDXLMJP to get the load module CDE name in which case you Can get length of the entire load module and see if the PSW SDWAEC1 or EC2 is within youR load module if not then the abend is somewhere in z/os in which case you will have to chain SDWARBAD to get to your program RB -Original Message- From: IBM Mainframe Discussion List On Behalf Of Michael A. Shaw Sent: Sunday, January 10, 2021 1:56 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining the Entry Point and Offset for an abending program in the SD WA On 1/9/2021 1:08 PM, esst...@juno.com wrote: > > . > The Program runs as a standard Batch Job with Multiple CSECTS and has an RB. > Why do I always get Zeroes in SDWAEPA ? > . > I don't see a field called "Offset" in the SDWA so I suspect that > needs to be calculated, but with out an Entry Point Address (EPA) I cant' calculate it. > . > Can some shed some light on my lack of understanding of this ? > . We don't use SDWAEPA 'cause it is zero sometimes (don't know why). We check to be sure bit SDWARPIV is OFF in the SDWAERRD byte, and if it is, we use the rightmost four bytes of the SDWACTL1 field as the address of the next instruction @ time of ABEND. Using that information you can see if the failure was in your ESTAE exit itself or not. If not, then you can use a combination of the address of the next instruction and breadcrumbs passed to your ESTAE exit via SDWAPARM to determine which CSECT was executing at the time of the ABEND. SDWACMPC helps you decide if the ABEND is worth retrying or not. Mike Shaw MVS/QuickRef Support Group Chicago-Soft, Ltd. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining the Entry Point and Offset for an abending program in the SD WA
You need to check the SDWANAME ( hope I spelled it right) I believe if the second 4 bytes is 0 i.e. you have a rb then you would need to obtain the entry point from CDE When the second 4 bytes is 0 then first 4 bytes is a RB check the corresponding RBCDE to see if CDENAME is you program name (if not loop backward via RBLINK) If yes the CDENTPT is your program entry point -Original Message- From: IBM Mainframe Discussion List On Behalf Of Michael A. Shaw Sent: Sunday, January 10, 2021 1:56 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Obtaining the Entry Point and Offset for an abending program in the SD WA On 1/9/2021 1:08 PM, esst...@juno.com wrote: > > . > The Program runs as a standard Batch Job with Multiple CSECTS and has an RB. > Why do I always get Zeroes in SDWAEPA ? > . > I don't see a field called "Offset" in the SDWA so I suspect that > needs to be calculated, but with out an Entry Point Address (EPA) I cant' calculate it. > . > Can some shed some light on my lack of understanding of this ? > . We don't use SDWAEPA 'cause it is zero sometimes (don't know why). We check to be sure bit SDWARPIV is OFF in the SDWAERRD byte, and if it is, we use the rightmost four bytes of the SDWACTL1 field as the address of the next instruction @ time of ABEND. Using that information you can see if the failure was in your ESTAE exit itself or not. If not, then you can use a combination of the address of the next instruction and breadcrumbs passed to your ESTAE exit via SDWAPARM to determine which CSECT was executing at the time of the ABEND. SDWACMPC helps you decide if the ABEND is worth retrying or not. Mike Shaw MVS/QuickRef Support Group Chicago-Soft, Ltd. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining the Entry Point and Offset for an abending program in the SD WA
On 1/9/2021 1:08 PM, esst...@juno.com wrote: . The Program runs as a standard Batch Job with Multiple CSECTS and has an RB. Why do I always get Zeroes in SDWAEPA ? . I don't see a field called "Offset" in the SDWA so I suspect that needs to be calculated, but with out an Entry Point Address (EPA) I cant' calculate it. . Can some shed some light on my lack of understanding of this ? . We don't use SDWAEPA 'cause it is zero sometimes (don't know why). We check to be sure bit SDWARPIV is OFF in the SDWAERRD byte, and if it is, we use the rightmost four bytes of the SDWACTL1 field as the address of the next instruction @ time of ABEND. Using that information you can see if the failure was in your ESTAE exit itself or not. If not, then you can use a combination of the address of the next instruction and breadcrumbs passed to your ESTAE exit via SDWAPARM to determine which CSECT was executing at the time of the ABEND. SDWACMPC helps you decide if the ABEND is worth retrying or not. Mike Shaw MVS/QuickRef Support Group Chicago-Soft, Ltd. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Obtaining the Entry Point and Offset for an abending program in the SD WA
>When I display SDWAEPA its always Zeroes. Consider checking the method by which you display SDWAEPA. The simplest case: -- Your program gets control via EXEC PGM= -- Your program sets ESTAE-type recovery (whether ESTAE, ESTAEX or whatever) -- the next instruction blows up (so that you know you are still running under the PRB -- your recovery routine gets control and the SDWA at offset x'60' will have SDWAEPA set. If you blow up under a PRB and the PRB has a CDE/LPDE address in RBCDE1, then SDWAEPA is set from CDENTPT and SDWANAME is set from CDNAME. I would assume that a SYNCH PRB would not have a CDE/LPDE address but a PRB created for ATTACH(X), LINK(X), XCTL(X) likely would. For an IRB, the SDWAEPA information is taken from RBEP. The conten If the entry point of the module is not at offset 0, you can calculate the offset of time of error versus the entry point, but that won't help you getting the offset into the module (or necessarily which CSECT). You might need AMBLIST for that (or at least knowledge of where within the load module the entry point is).. Here's an example of the beginning of an SDWA for the simple case: 09301494 840C1000 FF850001 FF850001 09301048 09300022 00FD7188 00FF3E00 005FED90 005DBFC8 00FCA680 005FEF28 005F83E8 01DC9C00 0001 093000C0 09301000 030F E3C5E2E3 40404040 0930 078D1000 89300094 00020001 7F4FA400 078D1000 89300094 Offset 58 is SDWANAME ("TEST" in my case) and offset 60 is SDWAEPA (x'0930' in my case). Peter Relson z/OS Core Technology Design -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Obtaining the Entry Point and Offset for an abending program in the SD WA
Hi, . I have an ESTAE Recovery program that basically does nothing. . I'm Trying to add some code to it. I have been able to externalized the following: SDWACMPC Completion Code SDWAEC1 LEFT HALF OF EC PSW SDWANXT1 TERMINATION ADDRESS . I'm am trying to locate two fields in the SDWA. The entry Point address which I believe is in SDWAEPA, and the Offset. . When I display SDWAEPA its always Zeroes. . The Program runs as a standard Batch Job with Multiple CSECTS and has an RB. Why do I always get Zeroes in SDWAEPA ? . I don't see a field called "Offset" in the SDWA so I suspect that needs to be calculated, but with out an Entry Point Address (EPA) I cant' calculate it. . Can some shed some light on my lack of understanding of this ? . Paul D'Angelo . . . -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN