Thanks to all the contributors on this thread!  It was especially relevant to 
me, as I ran into some code on Monday containing an extremely large word array 
and thought... using a slightly different approach and a bit array, performance 
could be very significantly improved. And now I'm prepped for the challenge!    

Mike 

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Philippe Leite
Sent: Friday, May 21, 2021 10:48 AM
To: [email protected]
Subject: Re: RES: Macro to set a bit string

Caution! This message was sent from outside your organization.

Jumps fixed:

         MACRO
         TBIT  &ACTION,&ARRAY,&BIT
         LCLC  &TBTIX
&TBTIX   SETC  'TBT'.'&SYSNDX'
         LR    14,&BIT
         SRDL  14,3
         SRL   15,29
         LAY   1,&ARRAY.(14)
         AIF   ('&ACTION' EQ 'TEST').ACON
         AIF   ('&ACTION' EQ 'FLIP').ACON
         AIF   ('&ACTION' EQ 'ON').ACON
         AIF   ('&ACTION' EQ 'OFF').ACOFF
         AGO   .ERROR1
.ACON    ANOP
         LLILL 14,X'0080'
         AGO   .EXEC
.ACOFF   ANOP
         LLILL 14,X'FF7F'
         AGO   .EXEC
.EXEC    ANOP
         SRL   14,0(15)
         EXRL  14,&TBTIX.X
         J     &TBTIX.T
         AIF   ('&ACTION' NE 'TEST').JTST
&TBTIX.X TM    0(1),0
.JTST    ANOP
         AIF   ('&ACTION' NE 'FLIP').JFLP
&TBTIX.X XI    0(1),0
.JFLP    ANOP
         AIF   ('&ACTION' NE 'ON').JON
&TBTIX.X OI    0(1),0
.JON     ANOP
         AIF   ('&ACTION' NE 'OFF').JOFF
&TBTIX.X NI    0(1),0
.JOFF    ANOP
&TBTIX.T DS    0H
         AGO   .MEXIT
.ERROR1  ANOP
         MNOTE 8,'*** ACTION PARAMETER INVALID'
         AGO   .MEXIT
.MEXIT   ANOP
         MEND

Reply via email to