All, The technique has been described extensively by the late Dr. John Ehrman. I think it was a Share presentation.
I used to create my own version. Works like a charm. I love to be able to simply manage a bit by name, not needing to care about the label used to define the storage location. Kind regards & happy programming! Abe === Op 15/08/2023 om 20:54 schreef Dave Clark: > "IBM Mainframe Assembler List" <[email protected]> wrote on > 08/15/2023 02:07:32 PM: >> Ratz! Those macros are not on my system. ;-b > > So, I whipped up my own simple versions and created a little test > program to see how it all works. It is even compatible with my macros for > conditional constructs. Thanks for the idea, Jonathan. > > MACRO > &LABEL TF &F > &LABEL TM &F,L'&F TEST FLAG BYTE > MEND > MACRO > &LABEL SF &F > &LABEL OI &F,L'&F SET FLAG BYTE > MEND > MACRO > &LABEL CF &F > &LABEL NI &F,X'FF'-L'&F CLEAR FLAG BYTE > MEND > > PRINT OFF > COPY IF IF/AND/ELSE/ENDIF CONSTRUCT > COPY SELECT SELECT/WHEN/ENDSL CONSTRUCT > COPY WHILE WHILE/WEXIT/WLOOP/WEND CONSTRUCT > PRINT ON > > TEST CSECT 0 > USING *,12 > SAVE (14,12) > LR 12,15 > SF FLAG3 > IF FLAG3,(ON,TF),$NOOP > WTO 'FLAG3 IS ON' > ELSE > WTO 'FLAG3 IS OFF' > ENDIF > CF FLAG3 > IF FLAG3,(ON,TF),$NOOP > WTO 'FLAG3 IS ON' > ELSE > WTO 'FLAG3 IS OFF' > ENDIF > RETURN (14,12),RC=0 > > DS 0D > FLAG1 EQU *,B'00000001' > FLAG2 EQU *,B'00000010' > FLAG3 EQU *,B'00000100' > FLAG4 EQU *,B'00001000' > FLAG5 EQU *,B'00010000' > FLAG6 EQU *,B'00100000' > FLAG7 EQU *,B'01000000' > FLAG8 EQU *,B'10000000' > DS BL1 FLAG BYTE > END TEST > > > Sincerely, > > Dave Clark
