On Wed, 20 Dec 2023 00:56:14 -0500, Tony Harminc <[email protected]> wrote:

>On Wed, 20 Dec 2023 at 00:48, Jon Perryman <[email protected]> wrote:
>> I locate the base reg and verify the branch around the module eyecatcher

>The trick is to not abend when you try looking at the eyecatcher. 
> A wild branch can easily destroy what you think is the base

There is no trick. All recovery risks secondary abends and at the very least 
must issue a message that recovery failed. This just adds one more use case 
that you can easily add to your secondary recovery. Secondary abends are very 
rare but you must always plan for them. For ARR and SETFRR routines, it's a 
little more complicated than ESTAEX but none the less you must plan how they 
will be handled.

>Where do you get the base reg?

You design according to what you know (e.g. abends, base regs, module 
eyecatchers and more). 

1. My product has a unique savearea (R13) eyecatcher. If it matches, the base 
reg is a known register. My code is what people call baseless but I chose to 
place the constants (including program eyecatcher with PTF) before the 
executable code. This makes it very IPCS friendly. There are other options you 
can use for baseless code which can also provide eyecatcher with offset but I 
won't delve into that here.

2. Base reg is always less than the abend address.

3. Base reg is always within a reasonable offset for assembler (e.g. 3 regs on 
using is 12K). 

4. More but I can't be bothered to list them here.

All the products I've worked on use this method because creating simple / 
useful diagnostics because it greatly simplifies problem solving for the 
customer and vendor. Consider when CSVQUERY.works giving you an offset into a 
LOAD MODULE name. You need to map the load module, find the CSECT at the module 
offset, subtract that offset to determine the CSECT offset and look up the PTF 
level for the CSECT. When CSVQUERY fails, I need you to send a dump to get this 
information. It's far easier for customers to simply cut and paste the 
diagnostics messages which has the CSECT and offset. 

This process is the same for user programs but realize when you get annoyed 
with this process, you are the one to blame.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to