RBCDE1 does not always contain the address of a CDE. So you always ought 
to check it for 0.
And you should always use RBCDE1 rather than RBCDE to locate the CDE 
unless you are AMODE 24.

>Maybe by comparing the current entry point to the R15 value in the CDE's 
RSA?

Instead, you would get a better answer by comparing your entry point 
address to the extent range(s) of the load module (or program object).
The CDE, when it's not for an alias (bit CDMIN) will have field CDXLMJP 
pointing to an extent list. For an alias, CDXLMJP points to the "major" 
CDE, and the major CDE's CDXLMJP will point to the extent list. The extent 
list for a module with no RMODE 64 segments is mapped by IHAXTLST. It 
consists of a field with the length of the extent list, a field with the 
number of extents, and then N extent lengths and then N extent addresses 
(this is ancient design, I do not know why they did not do N 
length/address pairs).

Of course one would always ask in what way knowing this would truly help a 
program.

Peter Relson
z/OS Core Technology Design

Reply via email to