I am heads down on a customer problem so cannot write a tutorial but I think LOCTR might well be able to do what you want.
LOCTR will let you break the CSECT into pieces that are not necessarily in the CSECT in the physical order of the instructions in the source. Let you code stuff "now" that will get placed after other stuff in the CSECT. You should be able to find examples on the WEeb. Charles -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Farley, Peter x23353 Sent: Friday, March 17, 2017 10:29 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: How to automatically position generated data areas after all program-defined areas I cannot see a way to do the following, so any enlightenment you can provide is appreciated. I have created new versions of an existing set of macros and the new versions require a fairly large set of non-reentrant data areas defined in the CSECT in which they are used. The first macro invoked (say, MACINIT) needs to define these areas in existing assembler programs that may or may not be close to exceeding their defined base registers. This is old, non-reentrant code that has not been converted to "baseless" mode, and doing that conversion now is not on the table due to time and resource constraints. Rather than defining the new data areas at the place where MACINIT is invoked (there is code as well as data in MACINIT, and the code has to be positioned near the start of the program), I would like to be able to have MACINIT place all of the new data areas AFTER all other data or code defined in the CSECT. All of the new data areas are referred to in the new macro versions by "relative long" instructions in the generated code, so they will work correctly even if the data areas are totally outside of the defined base register coverage areas. I have looked at the LOCCTR assembler instruction thinking that it might be a way to accomplish what I want to do, but I am not really clear on how to use it, or even if that is a way for me to do what I want to do. So far the only way to accomplish this that I can see is to have a separate "MACDATA" macro to be manually inserted into the old code at the appropriate position. I would prefer an automated solution that does not require a new "data" macro, if at all possible. TIA for any help you can provide. Peter This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system.