Additionally, if you need an exact length match, code:

WorkArea DSECT
WORD     DS    F
FOO      DS    X
BAR      DS    Y
WorkLen  EQU   *-WorkArea
         DS    (&WORKL-WorkLen)X
         DS    (&WorkLen-&WORKL)X


Robert Ngan
CSC Financial Services Group

IBM Mainframe Assembler List <[email protected]> wrote on
2014/08/18 11:20:48:

> From: Robert Ngan/USA/CSC@CSC
> To: [email protected]
> Date: 2014/08/18 11:21
> Subject: Re: How to assign length of generated instructions to
macrovariable?
> Sent by: IBM Mainframe Assembler List <[email protected]>
>
> We use code of the form:
>
> WorkArea DSECT
> WORD     DS    F
> FOO      DS    X
> BAR      DS    Y
> WorkLen  EQU   *-WorkArea
>          DS    (&WORKL-WorkLen)X
>
> If WorkLen exceeds &WORKL, the final DS will have a negative length and
> therefore generate an assembly time error.
>
> Robert Ngan
> CSC Financial Services Group
>

Reply via email to