On 17 March 2017 at 14:22, Farley, Peter x23353
<[email protected]> wrote:
> Thanks John, that does look like it would work, though it does still require 
> adding that last "MACINIT LOCCTR" statement manually at the end of the 
> program code and data.
>
> But if I have to manually place a statement at the end of the program anyway 
> it may as well be a MACDATA macro that just defines all the data areas there.

In MACINIT:

         AINSERT '$REALEND$ OPSYN END',BACK
         AINSERT 'END OPSYN MACEND',BACK

Then :

         MACRO
         MACEND
.* Generate whatever data you need here
         $REALEND$
         MEND

You can go further and define the MACEND macro within MACINIT. You can
even generate some or all of the data you want at the end based on
arguments to MACINIT, or to items you AREAD from where MACINIT is
invoked. And so on...

I used this for debugging but it's disabled in production builds. In
my case I use it to collect invocations of other macros through the
assembly, and then summarize their use and operands.

Tony H.

Reply via email to