Ed Jaffe wrote:

On 3/23/2020 2:15 AM, Thomas David Rivers wrote:

I think I've run into an interesting problem with ESTAEX
when it is invoked in AMODE 64 without SYSTATE AMODE=64
set at assembly time.

That is, this is code that could potentially run in either AMODE 31
or AMODE 64... so it's not assembled with SYSTATE AMODE=64.



Macro expansions can differ depending on the SYSSTATE settings. It's not safe to ignore that.


If the module can legitimately run in either AMODE, I would do something like:


|    SYSSTATE PUSH             Save current SYSSTATE
|    TAM   ,                   Test addressing mode
|    IF O                      If 64-bit mode
|      SYSSTATE AMODE64=YES      Tell macros how to expand
|      ESTAEX ...                Establish recovery exit
|    ELSE ,                    Else 31-bit mode
|      SYSSTATE AMODE64=NO       Tell macros how to expand
|      ESTAEX ...                Establish recovery exit
|    ENDIF ,                   EndIf
|    SYSSTATE POP              Restore current SYSSTATE


This is a really good idea...

There another complication though - the SDWAPARM in the ESTAE EXIT is different when SYSSTATE AMODE64=YES is specified on the ESTAEX macro. So, you might need
to do a test in the ESTAE EXIT for AMODE 64 as well.

That seems like it would make for a pretty generic routine... many thanks for the idea!

- Dave R. -


--
[email protected]                        Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com

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

Reply via email to