I do both. I have the USING when I either want multiple fields from the same DSECT or I want to reference the same field(s) multiple times rather than storing them myself somewhere. This latter is mainly when I am writing "pure" code, such as in LPA and am short on dynamic storage.
On Thu, Jun 1, 2023, 11:24 Phil Smith III <[email protected]> wrote: > We've all seen (and written!) code like this: > USING PSA,R9 > L R10,PSATOLD Get current TCB > DROP R9 > > USING TCB,R10 > L R9,TCBJSCB Get JSCB > DROP R10 > > I've also seen (and probably written) the equivalent: > L R10,PSATOLD-PSA(,R9) Get current TCB > L R9,TCBJSCB-TCB(,R1) Get JSCB > > I like the latter because it's tighter to read, reduces the USING map, > keeps you out of trouble if you decide to use R9 or R10 for something > global, etc. But I can also see a theological argument that you really > *are* using (USING?) the control block. > > Thoughts? (Yes, I *said* it was theology, so I'm prepared for religious > arguments!) >
