This assumes you can determine what the actual value of &BOUND within your
macro is. It could be an equated value or even an expression.
What I'd is the ability to pass a resolved non-relocatable value into a
macro. e.g. a new R' (or whatever) attribute:
FOO EQU 16
:
RNDUP R15,R'FOO
:
RNDUP R14,R'FOO*2
:
so macro would receive 16 or 32 instead of FOO or FOO*2
Then it'd be mach easier to check the numeric value.
My current kludge for this is:
&L SETA FOO
RNDUP R15,&L
:
&L SETA FOO*2
RNDUP R14,&L
:
Robert Ngan
CSC Financial Services Group
IBM Mainframe Assembler List <[email protected]> wrote on
2015/06/25 17:43:07:
> From: Mike Kerford-Byrnes <[email protected]>
> To: [email protected]
> Date: 2015/06/25 17:44
> Subject: Re: Rounding to a 2G-byte boundary
> Sent by: IBM Mainframe Assembler List <[email protected]>
>
> Add 1G twice? (You did not insist on an elegant solution.....)
>
> MKB
>
> -----Original Message-----
> From: IBM Mainframe Assembler List
[mailto:[email protected]]
> On Behalf Of Mark Boonie
> Sent: 25 June 2015 23:01
> To: [email protected]
> Subject: Rounding to a 2G-byte boundary
>
> I have macro that currently looks like this:
>
> MACRO ,
> RNDUP ®,&BOUND
> AGHI ®,&BOUND-1
> RNDDOWN ®,&BOUND
> MEND ,
>
> I was trying to update it to use the newer ALGFI instruction like this:
>
> MACRO ,
> RNDUP ®,&BOUND
> ALGFI ®,&BOUND-1
> RNDDOWN ®,&BOUND
> MEND ,
>
> However, I can't specify the boundary as a symbol equated to 2G (e.g.,
> SEGTBLRANGE EQU X'80000000') without getting an assembler error due to an
> overflow in an intermediate value. Does anyone have any alternative ways
> to do this? I really need the ability to handle 2G. Thanks.
>
> - mb
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1434 / Virus Database: 4365/9594 - Release Date: 06/25/15