Thanks. Very nice!

FWIW I am testing for support for "Fast Serialize" so this sort of approach 
won't work.

It's a nasty situation because an LGFI, for example, on a back-level machine, 
will produce a S0C1, but a fast serialize on a back-level machine will simply 
fail silently.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Steve Smith
Sent: Friday, September 29, 2017 9:20 AM
To: [email protected]
Subject: Re: Determining MACHINE level in a macro

Also, for simple cases, I often make macros like the following, in a convenient 
MACLIB (they cannot be in-line):

         MACRO
&LAB     LGFI  &R1,&I2                 LOAD IMMEDIATE
.*
.*       UNTIL LGFI IS ALLOWED, THIS MACRO WILL FAKE IT THE OLD-
.*       FASHIONED WAY.
.*
&LAB     LGF   &R1,=A(&I2)             LOAD
         MEND

At a level where LGFI is valid, the macro isn't even looked for, but on 
back-levels it brings it in.  Automatic upgrade without even having to do your 
own test.
I'm well aware that some new instructions cannot be easily "faked" in a 
sensible general way.  Just another way to do it when it's all you need.

sas

Reply via email to