Gil,

I think I was not clear enough. Yes, I use an extended R13 area for program work areas, but that is not what the original post was discussing. It was discussing a generic user written macro that currently required inline an inline data area. And writing a replacement that did not use an inline data area.

To cleanly use a new version of such macros anywhere the current one is used, it needs to be a drop-in macro that does not need other changes to the source. And in actuality, any common utility macro is move useful if there is no need for the programmer to add any additional work areas to the program. In those cases, the save area can be a good choice.

Personally, 95% of my code uses entry and exit macros that define several standard LOCTR areas. And most of my macros utilize these LOCTRs as ways to define storage. But there are still those small test programs that don't use my standard entry and exits, so I keep a few macros that can be dropped into a program (mostly for debugging) that don't require anything other than the standard R13 save area.

Tony Thigpen

Paul Gilmartin wrote on 01/14/2017 11:58 AM:
On 2017-01-13, at 14:00, Tony Thigpen wrote:

Although I used LOCTR extensively in my programs, I also use the save area 
(r13) as a work area for small home-grown macros. (As long as the code in the 
macro does not call something that saves/restores in the save area.)

Extend the save area.  Some have criticized even that practice.
I don't understand why.  Some prejudice that R13 should not be
used as a work area base?

-- gil


Reply via email to