Plus, not knowing all that is contained in the associated source, I would offer 
that one of the data elements in the dsect may be a referenced in subsequent 
code in such a manner as to require the data element to have already been 
defined. For example, if a dsect length were used in a length attribute 
expression within an MVC or something, the data element must be pre-defined. 

Bill Hitefield
Dino-Software Corporation
800.480.DINO
423.878.5660
www.dino-software.com

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Tony Harminc
Sent: Sunday, May 21, 2017 4:31 PM
To: [email protected]
Subject: Re: Assembler addressing issue

On 21 May 2017 at 15:24, Paul Gilmartin < 
[email protected]> wrote:

> On Sun, 21 May 2017 14:37:08 +0300, Binyamin Dissen wrote:
>
> >I fail to understand why you are placing the macro in the middle of 
> >your workarea. I would typically place all mapping macroes in a  
> >block at the
> end
> >of the program (though others prefer the top).
> >
> >Do you do the same with other mapping macroes that generate DSECTs?
> >
> >What do you expect this to give you?
> >
> Does it save one GETMAIN?  Some advocate appending the workarea to the 
> register save area to save another GETMAIN.


Including the macro (with generated DSECT statement) in the workarea is not the 
same thing as including the space for the mapped data in the workarea.
Typically one would include in the workarea something like AbcWork  DS  
XL(AbcLen) or
AbcWork   DS  XL(AbcEnd-AbcDSECT)

The macro/DSECT expansion would go somewhere else.

A very few mapping macros generate no DSECT statement, and many have an option 
to not do so (typically DSECT=NO). In those cases it may be reasonable to 
include the macro invocation in the workarea. It does have the down side that 
the offsets shown in the assembler listing are not zero-origin wrt the DSECT 
name.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to