The maximum length of a hexadecimal constant is 256 for a DC statement; 
for a DS statement it's 64K-1.

For fixed-point constants (H or F, but not Y), you can use Uddd for an 
unsigned value.  For example, DC H'U40000' will generate 9C40.

- mb

IBM Mainframe Assembler List <[email protected]> wrote on 
03/29/2016 11:52:48 AM:

> From: Paul Gilmartin <[email protected]>
> To: [email protected]
> Date: 03/29/2016 11:54 AM
> Subject: Re: Generating warning for AL2 expression truncation?
> Sent by: IBM Mainframe Assembler List <[email protected]>
> 
> On 2016-03-28, at 16:18, Ngan, Robert wrote:
> 
> > For non-relocatable values, the range of Y values is the same as a
> signed halfword.
> > In my case, I want unsigned values so I can't use Y.
> > I ended up coding:
> > 
> >         DC    AL2(expr)
> >         DS    0XL(65536-expr)      ASSERT: expr was not truncated
> > 
> HLASM Ref. tells me that the allowed values of the length modifier
> of an X constant are [1,256].  But is this enforced?
> 
> You might want to force halfword alignment.
> 
> Given that the hardware now supports unsigned halfwords, perhaps
> HLASM should accommodate.  Perhaps HU'65535' or YU(65535).  OTOH,
> it's an assembler; programmers should know what they're doing.
> But perhaps HLASM needs an ASSERT instruction.
> 
> -- gil

Reply via email to